Hi:
I met a problem when I use the OrderModify to change the stop value, an error pops as:
OrderModify error 1
Read this: https://www.mql5.com/en/forum/150158 . . . . then modify your code to Print() the current stop value before you try to modify it and also the value you are trying to modify it to . . . if it is the same then that is your issue.
Read this: https://www.mql5.com/en/forum/150158 . . . . then modify your code to Print() the current stop value before you try to modify it and also the value you are trying to modify it to . . . if it is the same then that is your issue.
Does it mean that if I just want to modify the ProfitTarget value, and remain the stop unchanged, the error message will keep showing?
Thanks
Does it mean that if I just want to modify the ProfitTarget value, and remain the stop unchanged, the error message will keep showing?
Thanks
No. If you are changing the takeprofit price to a different price and keeping the stoploss at the same price, the error message will not be generated.
From the documentation for OrderModify():
If unchanged values are passed as the function parameters, the error 1 (ERR_NO_RESULT) will be generated.
So, only if you invoke OrderModify() but don't pass any modified parameters to the function, an error (error 1 - ERR_NO_RESULT) is generated.
- 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:
I met a problem when I use the OrderModify to change the stop value, an error pops as:
OrderModify error 1
For example, the message occurs when I try to place the stop 3 pips under the low price of previous close candle.
It seems not affecting the result, but just keep showing the error message and it's really annoying me.
Any idea how to fix it?
Thanks