TROUBLESHOOTING · METATRADER 5
MT5 invalid price error (10015)
SYMPTOM
Orders are rejected with "Invalid price" or error 10015.
Causes, most likely first
1. The price is not aligned to the symbol tick size
Every symbol quotes in discrete steps. A calculated price of 4012.3457 on a symbol quoting to two decimals is not a price that exists. Round to the tick size read from the symbol specification rather than assuming a number of decimals.
2. A pending order is on the wrong side of the market
A buy limit must sit below the current price and a buy stop above it; sells are the mirror. Getting this backwards produces an invalid price rather than a helpful message, and it is the most common cause in EA code.
3. The price is stale
A price captured a few seconds ago may no longer be valid on a fast-moving symbol. Read the current tick immediately before sending rather than reusing a value from earlier in the logic. See off quotes.
4. The order is too close to the market
Brokers enforce a minimum distance for pending orders and stops. Inside it the request is refused. That is usually reported as invalid stops rather than invalid price, so if both appear, check the stop level first.
Why this happens
The word "invalid" is doing a lot of work here: it covers a price that does not exist on the grid, one on the wrong side, and one the broker will not accept at that distance. The Journal entry rarely distinguishes them.
The fastest diagnostic is to log the exact price being sent alongside the current bid and ask at that instant. Nine times out of ten the answer is visible immediately — it is on the wrong side, or it has more decimals than the symbol supports.
Related problems
- MT5 invalid stops errorOrders are rejected with "Invalid stops" or error 130, or positions open without SL and TP.…
- MT5 off quotes / no quotes errorOrders fail with "Off quotes" or "No quotes" even though the market appears open.…
- MT5 OrderSend failedThe Journal shows OrderSend failed with a numeric retcode and no obvious reason.…
Educational information only, not financial advice. Trading leveraged products carries substantial risk of loss. Last updated 2026-08-11.