r/metatrader • u/AlgoTraderTools • 3h ago
Information Your MT5 EA's stops pass the tester and get rejected live: stop level and freeze level
There are two symbol properties that decide whether your SL/TP survives the jump from the Strategy Tester to a live account, and almost nobody checks them before going live:
SYMBOL_TRADE_STOPS_LEVEL— minimum distance (in points) between the current price and any pending SL/TP/pending order price.SYMBOL_TRADE_FREEZE_LEVEL— a zone around existing orders/SL/TP where modifications and deletions are rejected.
Why the tester hides them: most demo environments and many brokers report stops_level = 0 and freeze_level = 0, so every order goes through no matter how close it sits to the market. Your EA therefore builds a pattern — trailing stops 2 points behind price, TP hugging the fill price — that has never been validated against a real constraint. On the live broker those properties are often 20-100+ points, and that's when the classic errors appear:
retcode 10016(invalid stops) onOrderSend— your SL/TP is inside the stops level.- Trailing logic that silently stops working: every
OrderModifyis rejected while price is within the freeze level, and your EA treats that as "no change needed" instead of an error. - Break-even moves that fail only during high volatility, because that's exactly when the freeze zone is widest relative to the buffer your code assumes.
Three things worth doing before any live deployment:
- Read both properties at init and log them. If
stops_level > 0, compute the actual minimum offset your strategy needs (stops level + spread + a small buffer) instead of assuming points. - Treat
OrderSend/OrderModifyrejections as data, not noise. Log retcode, stops level and freeze level together — after two weeks of logs you know the real per-symbol constraints, not the marketing numbers. - Re-check them after every broker or symbol change. They are per-symbol, per-broker values; an EA that trades fine on one broker can be structurally broken on another with identical settings.
The general pattern: backtests validate your logic against price data, but the execution envelope (stops level, freeze level, margin rate, deviation) only exists on the live side. If your edge is small enough that a 30-point stop level matters, that's not a broker problem — that's information about your strategy's margin of error.