Selecting the order again will update the OrderStopLoss(). Its similar to updating the price with resfreshrates.
You can not use any Trade Functions until you first select an order.
Perhaps you should read the manual.
How To Ask Questions The Smart Way. 2004
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
Did you select the order again after successfully modifying the order? What part of:
was unclear?
-
Don't double post! You already had this thread open.
General rules and best pratices of the Forum. - General - MQL5 programming forum 2017.07.19 - Bence Németh: Could you please help me to fix my code?Help you with what? You already know how to select an order.
This is the selection of an order:
Where should I pass this? After the 'return'? I don't really understand, sorry.
I have deleted your duplicate topic. Your code will only modify the SL if condition is also met to modify the TP.
How do you know that the SL is not being modified?
- 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 have run into something which is a little puzzling. i am modifying the stoploss of a trade using OrderModify(). i have checked the return value and the stoploss shift was successful and it is logged as something like:
but when i shortly thereafter call OrderStopLoss() for the same ticket, i find that the returned value is the OLD value of the stoploss and not the new one:
i thought that maybe a call to RefreshRates() would update the return value, but no luck there.
any ideas why it would behave like this? and, more importantly, how to get around it?
thanks,
andrew.