It's a strange error code considering the fact that you reset last error beforehand. Could you check the result variable, too:
bool result = OrderModify(p_ticketID, OrderOpenPrice(), p_newSL, OrderTakeProfit(), 0, orderColor); if(!result) { int err = GetLastError(); Print("Modify SL Error = ", ErrorDescription(err)); }
Don't look at GLE unless you have an error.

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
Hi everyone.
I'm developing an EA and sometimes I get an error 4027 ("too many formatters in the format function") when I try to modify the order SL.
The error does not always occur: sometimes it works, sometimes it doesn't and I don't understand the problem.
Here is the code I use:
Thanks for your help
Lorenzo