realtrademaster / EVIDENCE LAB

MT5 execution / demo exercise

MT5 error 10016: Invalid stops

A stop loss for a buy position looks 30 points away from the Ask. The broker requires 30 points, but MT5 rejects the stop. Check the distance from the Bid.

Return code 10016 means MT5 rejected the requested stop levels. For a position's stop loss and take profit, use the price that would close the position. Buy positions close at Bid. Sell positions close at Ask. Pending entry orders have their own price rules.

Spot the rejected stop

In this hypothetical EUR/USD quote, Bid is 1.10000 and Ask is 1.10012. The symbol's point and tick size are both 0.00001. Its minimum stop distance is 30 points, or 0.00030. The proposed stop loss for a buy is 1.09982.

Reveal the distance from the correct quote

The stop is 18 points below Bid. Subtract 1.09982 from 1.10000 to get 0.00018, then divide by 0.00001. The 30-point distance from Ask uses the opening quote.

At the same quote, a stop at 1.09960 would be 40 points below Bid. That passes the distance check in this snapshot. It would also increase the planned entry-to-stop distance from 30 to 52 points if the entry filled at 1.10012. Recalculate the cash risk and size, or pass on the setup. The quote can move before the request reaches the server.

Check the request in this order

  1. Get the exact request and return code. Record the symbol, timestamp, order type, proposed SL/TP and bid/ask near submission. Confirm whether the request opened a trade, placed a pending entry or modified an existing position.
  2. Check side, distance and price step. For a buy position, SL goes below Bid and TP above Bid. For a sell position, SL goes above Ask and TP below Ask. Use the symbol's stops level in points and verify each submitted price is on its tick grid. A price can have the right number of decimals and still miss the tick grid.

    In Market Watch, right-click the exact symbol and open Specification. Multiply its Stops level by its point size to get the minimum distance in price units. Recheck the direction and distance after rounding to the tick grid.

  3. Check modification restrictions separately. If an existing order or position cannot be changed, inspect the symbol's freeze level and the actual return code. Code 10029 indicates a frozen order or position.
  4. Reconcile the demo outcome. A developer can use OrderCheck as a preflight. After any demo submission, inspect the actual result and any matching deal. Keep the rejected attempt separate from a later fill.

For MT5 codes 10026 or 10027, use the terminal and broker permission guide. If the symbol name differs, check the broker symbol specification. For code 10030, check the supported filling policies.

Watch the MT5 error 10016 quiz

Open the Short on YouTube

Audit a win and a stop loss

Autobot can execute analyst signals on a configured MT5 account. In the TradeMaster Discord exercise, compare a win and a stop loss from a dated bot report, then use a hypothetical fill to see what your own demo history would need to show. The community gives you a place to discuss the checks.

Frequently asked questions

Is 10016 always a stop loss error?

The request can also fail on its take profit or the price of a pending entry. Inspect all price levels in the rejected request.

Why did my trailing stop fail even though the original stop worked?

The Bid or Ask may have moved, and an existing position can also be subject to the symbol’s freeze distance. Capture the quote and restrictions at the time of the modification.

MetaQuotes references