MT4 error 136: Off quotes (ERR_OFF_QUOTES)
The broker had no price it would trade at for this request. Nothing was executed; wait for a new tick and try again.
What it means
You see this code in GetLastError() in MQL4, after a trade function fails on the server side.
The dealer or server didn't give a quote for the request. Without one, the order can't fill.
It is common during sharp moves, at the open, and on symbols with few quotes.
No trade was opened, so there is nothing to undo.
Common causes
- A burst of volatility.
- The first seconds of a session.
- A large order on a thin symbol.
How to fix it
- Wait for a new tick, refresh rates and try again.
- Try a smaller size if it keeps happening.
- If it happens often at one time of day, avoid trading in those minutes.
Example in MQL4:
int ticket = OrderSend(Symbol(), OP_SELL, 0.10, Bid, 3, 0, 0, "", 4711);
if(ticket < 0 && GetLastError() == ERR_OFF_QUOTES)
{
Sleep(1000);
RefreshRates();
ticket = OrderSend(Symbol(), OP_SELL, 0.10, Bid, 3, 0, 0, "", 4711);
} Is it safe to retry?
Yes, after a short wait.
Could the order have executed?
No. There was no price to fill the order at.
How Tickwire handles it
Tickwire treats it like MT5 10021, and the MT4 code stays in the message. See trade results.
Related codes
One API for MT4 and MT5
Clear trade outcomes, idempotent orders and an audit log. Read the error reference or the quickstart.