Hi all,
Sometimes when we want to close an order an error message from the broker says that the price is invalid and we have to confirm to close the order.
In that case how is possible to confirm this with code ?
What I mean is if we can retry the OrdeSsend until ticket is different from zero how can we do the same in case of close ?
If you look at the error message in the documentation a recommendation is give for the action that your code should take, so for a requote error, error 138 ERR_REQUOTE you should follow this . . .
"The requested price has become out of date or bid and ask prices have been mixed up. The data can be refreshed without any delay using the RefreshRates function and make a retry. If the error does not disappear, all attempts to trade must be stopped, the program logic must be changed."
Sometimes when we want to close an order an error message from the broker says that the price is invalid and we have to confirm to close the order.
In that case how is possible to confirm this with code ?
- If you pass a valid price [OrderClosePrice()] and a reasonable slippage (adjusted for 4/5 digit brokers) you shouldn't get requote (except perhaps during news). Find out why.
- OrderClose returns a bool. What are Function return values ? How do I use them ? - MQL4 forum
- 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 all,
Sometimes when we want to close an order an error message from the broker says that the price is invalid and we have to confirm to close the order.
In that case how is possible to confirm this with code ?
What I mean is if we can retry the OrdeSsend until ticket is different from zero how can we do the same in case of close ?
Thank you in advance for any help provided.
Luis