MT5 ERROR GUIDE · UPDATED OCTOBER 2026

MT5 “Invalid price” and “off quotes”: why orders bounce

These two come from the broker's trade server, not from your terminal: the price your request carried is gone, or there were no quotes to process it. Fast markets, rollover minutes and one-sided feeds are the usual suspects. Here is how to read them and what actually fixes each case.

BBenjamin SF · Founder Published Oct 20, 2026 Read 7 min
Quick answer
These two come from the broker's trade server, not from your terminal: the price your request carried is gone, or there were no quotes to process it. Fast markets, rollover minutes and one-sided feeds are the usual suspects. Here is how to read them and what actually fixes each case.

Jump to: What 10015 and 10021 really mean · The 60-second diagnosis · The causes that produce 90% of the cases

01

What 10015 and 10021 really mean

Retcode 10015 (TRADE_RETCODE_INVALID_PRICE) is the server telling you there is no valid price to process your request: the price field of the order does not match any current quote. Retcode 10021 (TRADE_RETCODE_PRICE_OFF, “off quotes”) means there were no quotes at all for the symbol at that moment.

Both are transient by nature: they describe a mismatch between the market a millisecond ago and the market now. That is why blind retries at full speed make them worse, while waiting for the next tick usually makes them disappear.

02

The 60-second diagnosis

Open the History tab and read the reason column of the rejected order: the number there is your diagnosis. Then answer three questions. Does it happen only around rollover, the Sunday open or big news? Then it is the feed, not you. Only on one symbol (typically gold or an index at odd hours)? One-sided quote. On every order, even calm markets? Check the symbol's trade mode and your terminal's connection.

03

The causes that produce 90% of the cases

Fast market during news: the price moves between the moment your EA builds the request and the moment the server reads it; by then your price is stale and the server answers invalid price or off quotes. Rollover and market open: spreads widen to absurd levels and one side of the quote disappears for seconds.

Symbol in close-only mode or trading suspended by the broker: you can hold, you cannot open. A stale or frozen chart feed while the terminal reconnects. And in manual trading, sending a limit order priced through the current market: the server is kinder there, but tight-stop market orders during spikes hit the same wall.

04

The fix for each cause

For news and opens: avoid entering inside the spike. If you automate, a news filter is worth more than any retry logic, because it removes the seconds where these errors live. For one-sided quotes: wait for the next tick and refresh quotes before resending; do not loop retries at full speed, you will only stack rejections.

For close-only symbols: check the symbol specification (trade mode) and the broker's calendar; the error stops the moment trading reopens. For frozen feeds: reconnect the terminal (see the No connection guide) and resubscribe the symbol by opening its chart.

05

What it means if an EA sends your orders

An alert-driven EA sends at market the instant the alert fires, which is exactly when fast markets reject prices. Expected behavior: the rejected order is logged with its retcode in History and the next signal works. What you do not want is an EA that hammers the server with immediate retries: rate limits and more rejections follow.

If your strategy is news-sensitive, configure the news filter rather than hoping the requote resolves: skipping the release window is the only fix that removes the cause. The lot size you send also matters at these moments, because a rejection plus a bad size is how small accounts die on the next retry: size on paper first with a calculator, not with hope.

06

Frequently asked questions

Why do invalid price errors cluster at rollover and the Sunday open?

Spreads widen and quotes thin out for a few minutes while liquidity returns. Requests priced on the previous tick no longer match any quote, so the server answers 10015 or 10021 until the feed stabilizes. It stops by itself.

Should my EA retry immediately after one of these errors?

No. Retry on the next confirmed tick, not in a tight loop. Immediate retries send the same stale price again, stack rejections and can trip the server's rate limits, which turns a transient error into a timeout.

Is off quotes the same as a requote?

No. A requote (10004) comes back with a new price you can accept; off quotes (10021) means there was no quote to process the request at all. Requotes are negotiable, off quotes are just 'try later'.

Why does it only happen to gold or one index at night?

Thinner out-of-hours liquidity: one bank pulls its side of the quote and the feed goes one-sided for seconds. Any request on that symbol in those seconds bounces with 10021.

07

Trade the error column, not the popup

Codes in History, causes in the Journal: once you read them, MT5 stops being cryptic. The next step is automating the boring leg, so your TradingView alerts reach MT5 without you babysitting charts.

Reference: MQL5 runtime error codes; trade server return codes. 4756 and 10016 are different codes; 10016 identifies invalid stops.