please fix my Break Line ea.
The Idea is :
1. Identify the High, Low and Close prices for your 24 hour
period . example 00:00-23:59.
2. For example, the EURUSD for the last 24 hours:
High = 1.4100 Low = 1.3900 and Close = 1.4000
3. Identify the total movement of the 24 hrs:
H 1.4100 L 1.3900 = 200 pips (The 24hrs movement was
4. The Formula: - calculate 25% of the total 24hrs movement:
25% of 200 pips is 50 pips
5. Set your BUY and SELL orders 25% (in our case 50 pips)
above and below the Closing Price (in our case Close=1.4000)
In our case the orders:
BUY ORDER 1.4050 (Close price + 50 pips)
SELL ORDER 1.3950 (Close price - 50 pips)
6. Take profit:
Use the value calculated in step 4 above to establish the take
profit level. For a buy order you will add the value to your
entry price and for a sell order you will subtract the value from
your entry price:
In our case 25% = 50pips
BUY ORDER 1.4050 (Take Profit - 50 pips above = 1.4100)
SELL ORDER 1.3950 (Take Profit - 50 pips below = 1.3900)
i create EA with this Rule, but not Perfectly.
ea make Open Position unless not break the line.
i need your help.