error 1 means that the EA try to modify order to a stop loss level of the same value. So, nothing happen.
It is actually not considered as an error. You need to check the new SL level calculation before modify the order.
If it has the same value or less than StopLevel value specified be the broker, just pass it.
If it is too important to keep the SL too tight, then you need to work on stealth mode. Which means you have
to consider that SL value but never modify the order. Once price changes then you may make your changes
accordingly as it was exist. It is more complicated code but not much as you could expect.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have a problem related to the trailing stop, if I use it less than 15 PIPS it returns this error
----- OrderModify error 1
Please, does anyone know how to fix it in the code because I want to work with lower levels of trailing stop.