Off-Quote
Definition
An off-quote error in MetaTrader (return code 136) means the broker rejected the order because the requested price is too far from the current market price. Causes include outdated quote feeds, network latency, attempted trading during instrument-paused states (rollover, market closures), and stale EA price references. The fix is usually to refresh the quote before retrying.
In-depth: Off-Quote
The off-quote error is a specific kind of rejection in MetaTrader (MT4 error 136, MT5 retcode `TRADE_RETCODE_PRICE_OFF`) indicating that the price submitted with an order is no longer at or near the current market quote.
Common causes: 1. EA captures price at signal generation time but submits order milliseconds later, during which price has moved enough to exceed the broker's slippage tolerance 2. Network latency between EA (running on VPS or local PC) and broker server — every millisecond of delay increases the chance of off-quote in fast markets 3. Weekend gap — first trade on Monday open after a weekend gap commonly encounters off-quote because EAs may reference Friday's last quote 4. Trading paused state — instrument is technically tradeable but quotes are not currently flowing (around major news, exchange opens, technical issues) 5. Wrong symbol — EA references the wrong symbol code or suffix (some brokers use 'EURUSD' vs 'EURUSD.r' vs 'EURUSDpro')
Resolution patterns: 1. Refresh quote: call `SymbolInfoTick(symbol)` to get the latest tick before order submission. This is the standard fix. 2. Widen slippage: set the order's `deviation` parameter to a larger value (in points) to accept wider price ranges. Trade-off: accepting slippage that reduces edge. 3. Retry logic: catch the off-quote rejection and retry with refreshed quote, up to a maximum retry count. 4. Symbol validation: verify symbol code matches the broker's quotation, especially when porting EAs across brokers.
Broker-model differences: market-maker brokers may have wider 'off-quote' tolerance than ECN brokers because the dealing desk can absorb some price movement; ECN brokers reject more aggressively because orders pass through to liquidity providers who require precise matching.
For scalping EAs, off-quote events are critical to monitor — frequent off-quotes indicate that the EA's signal-to-execution latency is too high for the strategy's edge. Solutions: VPS co-located with broker server, EA code optimisation to reduce in-tick processing time, broker change to lower-latency provider.
For longer-term EAs, off-quote is annoying but rarely strategically important; retry logic typically resolves it within a few ticks.