Hi to all,
I'm studying EA building for some months and since the last week I've my EA running in a Live account.
My EA close positions based on trailing stop (Trailing start at 2.5 pips of profit, 1.0 pips of step)
In strategy tester all is OK but now in a live environment I see that sometimes my order modify commands get rejected (most of times modification is successfull).
My opinion is that my Trailing Step is very tight so, it is possible that in the time that passes from my "set S/L" command and the real execution of that command price changes and then my SL become higher than Ask (example of Buy position).
These are two log error messages that I've received during last session:
I attach the Trailing function of my EA.
What do you think about?
Thanks to all for knowledge! :)
Fabio
Your new stop loss level (1.33943) was probably too close to the current price (1.33968), difference is 2.5 pips only which is very small. In normal trading hours it may work (even if it is very tight) but during night hours many brokers widen spreads and other trading parameters and thus your operation could not meet required conditions.
https://book.mql4.com/appendix/limits
- book.mql4.com
Your new stop loss level (1.33943) was probably too close to the current price (1.33968), difference is 2.5 pips only which is very small. In normal trading hours it may work (even if it is very tight) but during night hours many brokers widen spreads and other trading parameters and thus your operation could not meet required conditions.
https://book.mql4.com/appendix/limits
Thanks a lot for your reply!!
I will try to use MODE_STOPLEVEL when I set my SL.
Do you think that it is better to close positions with OrderClose command instead of making trailing stop in night hours?
Thanks again!!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi to all,
I'm studying EA building for some months and since the last week I've my EA running in a Live account.
My EA close positions based on trailing stop (Trailing start at 2.5 pips of profit, 1.0 pips of step)
In strategy tester all is OK but now in a live environment I see that sometimes my order modify commands get rejected (most of times modification is successfull).
My opinion is that my Trailing Step is very tight so, it is possible that in the time that passes from my "set S/L" command and the real execution of that command price changes and then my SL become higher than Ask (example of Buy position).
These are two log error messages that I've received during last session:
I attach the Trailing function of my EA.
What do you think about?
Thanks to all for knowledge! :)
Fabio