Stop Level and Freeze Level: Why Your SL Gets Rejected
Contents
A Rejected SL Isn't Always an EA Bug
Here is the conclusion up front. In most cases where an SL can't be placed or moved, the cause isn't the EA's logic. It is the "minimum distance" set by the symbol specification. MT5 has two such limits. The "stop level" sets how far from the current price an SL or TP must be. The "freeze level" blocks modifications when the price gets close to an SL, a TP, or a pending order.
The tricky part is that these distances aren't always the same. An SL distance that normally goes through can be rejected only right after a news release. When we build EAs, we always check these distances before sending an order. This article covers how the mechanism works, how to check it, and the limits of EA-side countermeasures.
Recommended Broker Comparison →
🎁 Download Free EA📧 Free 8-email course + subscriber-only pack of 13 MT5 indicators
* Privacy strictly protected. You can unsubscribe at any time.
How It Works: Two "Minimum Distances"
Stop Level
The stop level (SYMBOL_TRADE_STOPS_LEVEL) is the minimum distance from the current price to the SL or TP, expressed in points. It is measured from the Bid for a buy position (the price that closes it) and from the Ask for a sell position. If you try to set an SL closer than this distance, the server rejects the order, and the MT5 return code is "Invalid stops" (10016).
Freeze Level
The freeze level (SYMBOL_TRADE_FREEZE_LEVEL) is the distance within which an order can no longer be modified or deleted once the price approaches the SL, TP, or pending order price. When a trailing-stop EA tries to move its SL just before the position closes and gets rejected, this is usually the cause. The return code is "Frozen" (10029).
| Item | Meaning | Affected operations | Main rejection code |
|---|---|---|---|
| Stop level | Minimum distance from the current price to the SL/TP | Setting SL/TP on a new order, modifying the SL | Invalid stops (10016) |
| Freeze level | Distance within which modifications are blocked when price nears an SL, TP, or pending order | Modifying SL/TP, modifying or canceling pending orders | Frozen (10029) |
"0" Does Not Mean "No Restriction"
Even if the symbol specification shows a stop level of 0, that doesn't mean you can place an SL as close as you like. Some brokers appear to apply a different server-side rule when the value is 0, such as a distance based on the spread. We haven't verified every broker's implementation, so we conservatively treat "0 = keep at least the spread away".
Distances Widen Around News Releases
The stop level and freeze level aren't fixed values, and brokers may change them at their own discretion. Some brokers temporarily widen them around major news releases, right after the weekly market open, or during the rollover window. The spread also widens in the same windows, so an SL on a sell position, which is measured from the Ask, has to be placed even further away than the actual price movement would suggest.
In other words, a distance that looks fine against the normal symbol specification can be rejected at the moment it matters most. With an EA designed so that the entry goes through without the SL, you also risk being left with an unprotected position.
How to Check, and a Checklist
Check the following items on the account you actually use.
- Open the symbol specification: Right-click the symbol in Market Watch and choose "Specification". Note the "Stops Level" and "Freeze Level" values (the unit is points).
- Convert points to price: One point is a different price width for XAUUSD and USDJPY, so check the number of digits and convert to a price difference.
- Compare with the EA's SL distance: Confirm that the SL distance used in the EA's settings or logic is comfortably larger than the stop level plus the spread.
- Look again before and after news releases: Open the same screen just before a release and see whether the values change. You can't know whether your broker does this until you actually look.
- Check the logs: Look in the "Journal" and "Experts" tabs for "Invalid stops" or "Frozen". We also cover how to isolate the cause of rejected orders in EA & MT5 Know-How.
For how to configure an EA, see How to Set Up an EA. For differences in trading conditions between brokers, see Forex Broker Comparison.
The Minimum-Distance Check on the EA Side
Our EAs run the following checks, in this order, immediately before sending an order.
- Fetch the current stop level, freeze level, and spread every time (never use a value fetched only once at startup)
- Define the minimum distance as the larger of the stop level and the freeze level, plus the spread and a small margin
- If the SL is closer than this distance, skip the entry instead of widening the SL on its own
We don't widen the SL automatically because doing so makes the loss per trade larger than designed. If the lot size is calculated backward from the SL distance, widening only the SL breaks the risk percentage. Skipping reduces the number of opportunities, but we judge that better than taking on risk we never planned for.
Limits and Caveats
This check can't prevent every problem.
- Hard to reproduce in backtests: As we understand it, the MT5 Strategy Tester uses the symbol specification's current settings and doesn't reproduce past moments when distances widened around news releases. The shorter an EA's SL, the larger the gap between test results and live results can be. For example, GOLD TRIPWIRE is a short-holding type with an average holding time of 0:21:12 in backtests, so we consider it more exposed to this kind of gap.
- Skipping changes the results: Some of the trades skipped by the check would have been winners. Adding the check makes the trading differ from the backtest.
- Conditions can change at the moment of ordering: Conditions can change between passing the check and the order reaching the server, so rejections can't be reduced to zero.
- The SL itself can slip: Even if the SL is placed, a sudden market move can fill it at a price worse than the SL. The minimum-distance check is not a slippage countermeasure.
Summary
- Most SL rejections come from the symbol specification's stop level (minimum distance) and freeze level (distance where modifications are blocked)
- A rejection returns the code "Invalid stops" or "Frozen"
- A stop level of 0 doesn't necessarily mean "no restriction". Keep at least the spread away
- Some brokers widen distances and spreads around news releases, so orders can be rejected at the most important moment
- Our EA design fetches the current values every time, runs the check, and skips the entry instead of widening the SL if the distance is insufficient
- Backtests can't easily reproduce past changes in these distances. The shorter an EA's SL, the more you should watch for gaps in live trading
Related
📧 Free 8-email course + subscriber-only pack of 13 MT5 indicators
* Privacy strictly protected. You can unsubscribe at any time.
Have a question about EAs or FX?
You can post it on the Nattzy trading forum (free sign-up). Questions beyond this article are welcome too — EA settings, choosing a broker and more.
Ask on Nattzy ↗