You can't use zero for the price, A) can't modify price of an open order, or B) zero is an invalid price. You can use zero for the others if you don't want them.
Use the actual values OrderOpenPrice(), OrderTakeProfit() and OrderExpiration()
Trade Functions - MQL4 Reference
You would know that had you bothered to look at the example provided
bool res=OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(Bid-Point*TrailingStop,Digits),OrderTakeProfit(),0,Blue);OrderModify - Trade Functions - MQL4 Reference
You can't use zero for the price, A) can't modify price of an open order, or B) zero is an invalid price. You can use zero for the others if you don't want them.
Use the actual values OrderOpenPrice(), OrderTakeProfit() and OrderExpiration()
Trade Functions - MQL4 Reference
You would know that had you bothered to look at the example provided
Thanks,
If we want to change the stop loss of a pending order, same is valid?
As the reference says that "Open price and expiration time can be changed only for pending orders. If unchanged values are passed as the function parameters, the error 1 (ERR_NO_RESULT) will be 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
When I want to modify only the stop loss of an opened order, should I use zeros for price, takeprofit and expiration parameters as shown in the following?