Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
This is false
should be :
And a "continue" instead of a "break"
Thanks ffoorr,
With your help, sell position is taken by the EA.
I keep for ( i = OrdersTotal () .. because I have seen somewhere with i = 0 that can bring error with a lot of trade.
Thanks again for your help :)
Next step for me is to add Trailing stop in my code.
Hi again guys !
I have a question about automatic trading.
So, my EA take buy position when the Candle [0] passed over the Average Moving but I have a big problem.
In fact, if Candle [0] go below this Average Moving, EA closed this Trade. Even if, it's the same Candle.
I don't understand because when a trade is opened, my close conditions are not met.
Thanks in advance if you can help me.