Can an "Off Quotes" error happen with OrderClose() ?

 

Hi everybody,


It's the first time I'm posting here, so: apologies if I don't respect some forum rule which I still don't know.


I have a question about "off quotes" error. In one of my MetaTrader4 account (broker: CMC) - which is a "Market" execution type broker, I had, some time ago, an off quotes error when opening an order (with OrderSend()...). This only happened once in weeks, so I suppose it was a little temporary connection problem. Anyway, in my EA's, I managed to handle that kind of problem by following this: https://www.mql5.com/en/forum/158943


Now I'm wondering if such errors can also happen when I'm closing an opened order with OrderClose(). I suppose it can - and should deal with it in my code -, but I googled about that without finding any concrete example of that.


So my question: with a "Market" Execution type broker, can "offquotes" error happen when I close a position with some code such as "OrderClose(OrderTicket(),OrderLots(),Ask,0,Green)" ?


Merci :)

How to handle off quotes
How to handle off quotes
  • 2016.04.22
  • www.mql5.com
Hello comrades. How can I handle off quote errors in MQL4? What function to call...
Reason: