
MT5 Error 10016 Invalid Stops: Why Your SL or TP Is Rejected
MT5 error 10016 is the return code TRADE_RETCODE_INVALID_STOPS, which MetaQuotes describes as "Invalid stops in the request." It means the broker looked at the stop loss or take profit attached to an order or a modification and refused it, and since the whole request fails, a market order carrying an invalid stop does not open at all.
There are only a handful of reasons a stop can be invalid, and the symbol's specification tells you which rules apply to it, so work through the causes below in order and the one that applies to your trade will usually stand out quickly.
1. The stop is closer than the broker's stops level#
Most brokers set a minimum distance between the current price and any stop loss or take profit. In MT5, this is the Stops level in the symbol's specification, measured in points and read by EAs as SYMBOL_TRADE_STOPS_LEVEL, so a stops level of 15 on a five-digit EURUSD means 15 points, or 1.5 pips, and a stop placed 1 pip from the price is refused.
To find it, right-click the symbol in Market Watch, open Specification and read Stops level. The value can differ between symbols, between account types and between demo and live servers at the same broker, so check it on the account you actually trade. Then place the stop and target at least that far from the price, with some room for movement while the order is in flight.
2. The distance is measured from the closing price, not the entry#
A buy opens at the Ask and closes at the Bid, so its stop loss and take profit are checked against the Bid, while a sell opens at the Bid and closes at the Ask, so its levels are checked against the Ask. When the spread widens, the distance on one side shrinks even though the chart does not appear to move. That is why tight stops fail most often around news, at the daily rollover and on thin symbols, where a stop that passes at 2 pips of spread can fail at 8. Allow for the spread you will actually meet at the times your strategy trades.
3. The stop or target is on the wrong side of the price#
For a buy, the stop loss has to sit below the price and the take profit above it, and for a sell it is the reverse, so a wrong-side level is always invalid whatever the stops level happens to be. This happens more often than you might expect with automation. Typical causes are a strategy that reuses one alert template for both directions, a calculation that subtracts where it should add, or a fixed price taken from the alert's bar after the market has already moved through it.
4. Pips, points and prices are mixed up#
On a five-digit forex symbol, one pip equals ten points, so a value meant as 50 pips but sent as 50 points becomes a 5-pip stop that can easily fall inside the stops level. A price such as 1.0850 sent where a distance is expected, or a distance sent where a price is expected, produces a level nowhere near the one you intended. Gold, indices and crypto CFDs make this harder still. What counts as a pip on those symbols varies between brokers and data feeds. Check how your EA or bridge reads each parameter, and test a stop on a demo account before trusting a new symbol.
5. A modification hit the freeze level#
Some brokers also set a Freeze level, shown in the same specification window and read as SYMBOL_TRADE_FREEZE_LEVEL. When the price comes within that distance of an existing stop or target, the broker refuses changes to it. Trailing stops and breakeven moves modify levels close to the current price by design, so they are the ones this affects most. An EA that trails stops should therefore skip a modification that would break the stops or freeze level and try again on a later tick, rather than repeating the same request.
How PineHook prevents and explains invalid stops#
If your stops come from TradingView alerts, the alert decides the levels. The most reliable fix is to send distances rather than fixed prices where you can. A distance is applied to the price at execution, so it cannot end up on the wrong side of the market after a move. PineHook supports both, and it checks the result before the broker ever sees it.
For example, this alert buys 0.1 lots of EURUSD with a stop loss 20 pips below the entry and a take profit 40 pips above it, wherever the price happens to be when the order executes:
LICENSE,buy,EURUSD,size_lots=0.1,sl_pips=20,tp_pips=40
The same trade written with fixed prices, such as sl_price=1.0830,tp_price=1.0870, only works while EURUSD is still between those two levels, and is refused as an invalid stop if the market has moved past one of them by the time the order arrives. Replace LICENSE with your own license key, and see Default mode commands for the other stop and target options, including percentages.
The PineHook EA compares every stop and target with the symbol's stops level before sending the order. When one is too close, it refuses the order itself with a message that states the distance, the minimum and the units, so you can correct the alert without opening the symbol specification:
SL distance 0.00008 is below broker minimum 0.00015 (SYMBOL_TRADE_STOPS_LEVEL=15 points) for EURUSD
A price-based stop or target on the wrong side is also refused before any order goes out, either when the alert arrives or by the EA against the live quote, and the explanation appears on the alert's Signal Logs row in the same plain terms. Trailing stop and breakeven updates that would break the stops level are skipped and retried as the price moves, with the note [Trail] STOPS_LEVEL violation, skipping SL update, will retry in the Experts tab, so a temporary refusal never turns into a stuck stop. The parameter rules are in Common parameters, multi-target ladders are covered in Multi TP/SL, and you can create a PineHook account without payment details to try it on a demo account.
FAQ#
Can I open the trade without stops and add them afterwards?
Technically yes, and some EAs do this to avoid 10016, but it leaves the position unprotected between the fill and the modification, and the modification can still fail for the same reason. Fixing the distance is the safer answer.
Why does the same stop work on demo and fail with 10016 on live?
Demo and live servers often have different stops levels, spreads and symbols, so compare the specification of the failing symbol on both accounts.
Is MT5 error 10016 the same as error 130?
130 is MT4's code for invalid stops, and MT5 reports the same broker refusal as 10016.
Related guides#
- MT5 error 4756 trade request sending failed
- MT5 invalid volume
- Trailing stop and breakeven
- Invalid stops in the trade errors reference
MetaTrader is a trademark of MetaQuotes, and PineHook is an independent product that is not affiliated with, endorsed by, or sponsored by MetaQuotes. Leveraged trading carries a high risk of loss, so test any automated setup on a demo account before you trade it live.
