Advertisement IC Markets

The MT5 deviation setting and what it does to your fills on fast markets

Compare ECN/Raw spread brokers, analyze execution speeds, report slippage, and evaluate commission structures for high-frequency traders.
Post Reply
Fairman
Posts: 6955
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

The MT5 deviation setting and what it does to your fills on fast markets

Post by Fairman »

The MT5 deviation setting and what it does to your fills on fast markets

when you send a market order on MT5, there's a deviation or slippage setting, which is the maximum difference in price you'll accept between what you requested and what you get. I didn't pay attention to it for a long time and it was costing me.

If it's set too wide, the order will fill at nearly any price during a fast move, and you can get a bad fill. If it's set too tight, the order may be rejected in a fast market, and you'll miss the entry. There's no perfect value. It depends on the pair, the time of day and how fast you need the fill.

For my entries in normal conditions, I use a small value, like a pip or so on majors, and for stop orders I allow a bit more because I'd rather exit than not. In an EA, you set it in the code, and it's worth thinking about it per symbol rather than using one number.

Better yet, use limit orders where possible. Then the question goes away because you're stating the price you'll accept.
It’s Fairman :geek:
Recommended broker for automated trading & scalping IC Markets
Fairman
Posts: 6955
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

Re: The MT5 deviation setting and what it does to your fills on fast markets

Post by Fairman »

Worth knowing that on some account types the deviation setting does nothing. If your broker uses market execution, orders are filled at whatever price is available and the setting is ignored. It only applies with instant execution, where the broker can reject or requote if the price moved too far. You can usually see which one your account uses in the order window or the symbol specification. I spent a while adjusting it before realising it had no effect on my account.
It’s Fairman :geek:
Fairman
Posts: 6955
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

Re: The MT5 deviation setting and what it does to your fills on fast markets

Post by Fairman »

For EAs, I set the deviation per symbol by looking at the normal spread and allowing roughly one to two times that amount. A single number across everything made no sense, because one pip on EURUSD and one pip on GBPJPY are very different in a fast market. I keep the values in an input so I can change them without recompiling. On news days the EA does not trade anyway, so the setting mostly matters around busy session opens.
It’s Fairman :geek:
Shadow Trader
Posts: 5594
Joined: Wed Sep 09, 2026 5:19 pm

Re: The MT5 deviation setting and what it does to your fills on fast markets

Post by Shadow Trader »

The stop order part needs one caveat. A stop loss sitting on the server is filled as a market order by the broker when it triggers, so the deviation value never touches it, and it only applies when the platform or the EA sends the closing order itself.
img_13539_r1.png
img_13539_r1.png (90.49 KiB) Viewed 156 times
In code the value is set in points, not pips, which catches people out. On a five digit quote a deviation of 10 is one pip, while a value of 1 is a tenth of a pip and gets plenty of rejections on a busy open.

The trade off is easier to judge with numbers attached. The chart (illustration) uses a made up EA sending 200 market entries in fast conditions: at 0.5 pips about 30 percent are rejected and fills slip 0.2 pips on average, while at 5 pips almost everything fills but the average slip is 1.1 pips.

The rejected orders are not a random sample either. They are the entries where price was moving fastest, so on a breakout system they might be the best trades, and on a fade they might be the ones worth missing.

That makes it worth logging rejections as their own outcome in the EA. Has anyone compared what the rejected signals would have made against the filled ones?
Shadow Trader
Posts: 5594
Joined: Wed Sep 09, 2026 5:19 pm

Re: The MT5 deviation setting and what it does to your fills on fast markets

Post by Shadow Trader »

Retry logic in an EA can quietly undo whatever deviation is set. Three retries at a 1 pip deviation, each resent at the new price, can end up 3 pips from the original signal, which is a wide setting by another name.

A cap fixes it, measured from the signal price rather than from the latest quote. Say the EA allows 1.5 pips of total drift and then drops the trade, so retries only help when the move was a brief flicker.

The filling policy in MT5 matters on bigger orders as well. With fill or kill the whole volume fills or nothing does, while immediate or cancel can fill part of the order and cancel the rest, so a 2 lot entry might arrive as 1.3 lots and any partial close logic written for 2 lots then works on the wrong volume.

The allowed policies depend on the symbol and execution type, so the EA should read them from the symbol settings. An unsupported policy produces a rejection that looks like slippage in the log.

Does anyone record the requested price and the filled price for every order the EA sends? Over a few hundred orders the average difference by hour shows whether the setting needs to change around the session opens.
FXS Prop Desk
Posts: 1689
Joined: Wed Oct 07, 2026 9:52 am

Re: The MT5 deviation setting and what it does to your fills on fast markets

Post by FXS Prop Desk »

The deviation setting is often ignored, and it can make a big difference during fast moves. What value did you settle on? A typical setting is a few points to a couple of pips, but on gold or during the London open you may need more to get filled at all.

One trade-off to keep in mind: a very tight deviation can leave you without a fill when you most need one, especially on exits. Some traders use a tight value for entries and a wider one for stop losses, so that exits are guaranteed even if the price is worse.
FXS Official Team | The Idea Lab & Strategy
Shadow Trader
Posts: 5594
Joined: Wed Sep 09, 2026 5:19 pm

Re: The MT5 deviation setting and what it does to your fills on fast markets

Post by Shadow Trader »

Requotes and slippage are often treated as the same annoyance, but they come from different execution models with different consequences. A requote interrupts the order, shows a new price, and asks for confirmation. Slippage fills the order automatically at whatever price is available within an allowed deviation.

The requote model gives the trader a second decision, but by the time the new price appears the market may have moved again, producing a loop of repeated requotes. The slippage model removes that loop and offers speed, at the cost of accepting a price that might not match the screen.

For scalpers, the deviation setting is crucial. A deviation tolerance of zero produces frequent rejections in fast markets. A very generous tolerance guarantees fills but invites poor prices. Many scalpers settle on a small tolerance, often one to three points, and then monitor the rejection rate to tune it. The right figure depends on pair, session, and strategy timeframe.
Post Reply