◆ New — Strategy Validator, Code Fixer & Prop Compliance Checker are live. Try one free →
Home / Learn / What Is Slippage in Trading — and How Much Should You Budget For?
Trading Education

What Is Slippage in Trading — and How Much Should You Budget For?

A precise look at slippage: what it is, the market mechanics that produce it, how its size varies by instrument, session, and order type, and how to inject a slippage assumption into a Pine Script or MetaTrader backtest instead of pretending fills are perfect. This is educational material only, not financial advice; the ranges here are planning assumptions to verify against your own fill data, and trading always carries a real risk of loss.

What is slippage, and how much should you expect?

Slippage is the difference between the price you expected an order to fill at and the price it actually filled at. For a retail-sized market order on a major forex pair during liquid hours it is typically small — often effectively zero to a fraction of a pip — but around news releases, at rollover, on weekend gaps, or in thin instruments it can reach several pips or more, and it tends to be worst exactly when a stop-loss is the order being filled.

That two-sided answer is the honest one, and it is why a single flat number is the wrong way to think about slippage. Slippage is not a fee your broker charges; it is a property of how markets fill orders. A market order says "fill me now at whatever is available." Between the moment your platform sends it and the moment it executes, the best available price can change — and if your order is larger than the size resting at the best quote, the remainder fills at the next levels down the book.

Two consequences follow. First, slippage is asymmetric in practice: it can be positive (price improvement) or negative, but the orders most exposed to it — stops triggered in fast markets — fire precisely when liquidity has thinned and price is moving against you. Second, slippage is conditional: the same strategy pays very different slippage depending on when it trades, what it trades, and which order types it uses. Any backtest that assumes perfect fills is quietly assuming the best case of all three, which is one reason live results so often undershoot tester results. None of this is financial advice — the goal here is correct cost accounting, not returns.

Where does slippage actually come from?

Slippage has a handful of concrete mechanical sources, and knowing which one is biting you matters because they respond to different fixes.

Latency. Your order travels from platform to broker to liquidity provider. In a fast market, the quote you clicked is stale by the time the order arrives. This component grows with volatility, not with your size.

Depth consumption. Quotes have finite size. If the best ask offers less than you want to buy, the rest of your order walks up the book. Retail sizes on major pairs rarely trigger this; larger sizes, exotic pairs, and off-hours trading trigger it routinely.

Stop orders converting to market orders. A stop-loss is a trigger, not a guaranteed price. When the trigger trades, your broker sends a market order — into a market that, by construction, is moving against your position. This is why stop slippage is systematically negative and why it clusters around news.

Gaps. If price jumps across your stop level — a weekend open, a news candle, a thin-market air pocket — there is simply no price at your level to fill at. You get the next traded price, and the difference can dwarf everyday slippage. No execution technology removes gap risk.

Last look and requotes. Some liquidity providers may reject or re-price an order after seeing it. Depending on your broker's execution model, that shows up as a requote or as slippage.

The common thread: slippage is liquidity-conditional. A strategy that trades the London/New York overlap on EUR/USD lives in a different cost regime from the same code trading an exotic cross at 5pm New York time.

How much should you budget, by instrument and session?

There are no universal numbers — execution quality varies by broker, account type, size, and market regime — so treat what follows as planning budgets to verify, not measurements. The only slippage figures you should ultimately trust are your own: compare requested versus filled prices in your broker's trade history, or read your broker's published execution-quality disclosures where they exist.

As a starting grid for a retail-sized account, a defensible way to budget is relative to the instrument's typical spread:

  • Major pairs, liquid sessions (London, New York, the overlap): budget a fraction of the typical spread per market order — on the order of tenths of a pip. Many fills will be better; some will be worse.
  • Major pairs, news releases (NFP, CPI, rate decisions): budget multiple pips on any order that executes in the first seconds, and assume stops fill notably worse than their trigger level.
  • Rollover (around 5pm New York): liquidity is at its daily minimum while books hand over; budget several times your liquid-hours assumption and expect wide spreads to compound it.
  • Crosses and exotics: scale your budget up with the spread — an instrument quoted several pips wide will slip in proportion.
  • Indices, metals, crypto CFDs: apply the same logic in the instrument's own tick units; fast markets in these products can slip dramatically.

The test of a budget is not whether it is exactly right but whether your strategy survives it. If edge disappears when you charge one extra pip per round trip, you do not have a robust strategy — you have a fill-quality bet. That is a conclusion worth reaching in a tester rather than in a live account.

How do you inject slippage into a Pine Script backtest?

TradingView's broker emulator fills at idealised prices unless you tell it otherwise, and the strategy() declaration gives you a first-class knob: the slippage parameter, measured in ticks (minticks), applied against you on market and stop orders. Combine it with commission and you have a cost-aware baseline in two lines:

//@version=6
// Educational only — validate before trading; not financial advice.
strategy("Cost-aware SMA cross", overlay = true,
     slippage = 2,
     commission_type = strategy.commission.cash_per_contract,
     commission_value = 0.00003)

stopPts = input.int(300, "Stop loss (points)", minval = 1)

fast = ta.sma(close, 20)
slow = ta.sma(close, 50)

longSig = ta.crossover(fast, slow)
if longSig and barstate.isconfirmed and strategy.position_size == 0
    strategy.entry("Long", strategy.long)

if strategy.position_size > 0
    strategy.exit("Exit", "Long",
         stop = strategy.position_avg_price - stopPts * syminfo.mintick)

With slippage = 2, every market-order fill is moved two ticks against the position, and stop fills are penalised the same way — which is exactly the direction real stop slippage runs. Because the unit is syminfo.mintick, translate deliberately: on a five-decimal EUR/USD feed one pip is ten ticks, so a half-pip budget is slippage = 5. On an index CFD with a 0.25 mintick, slippage = 2 is half a point. The same number means different things on different symbols, so set it per instrument, not once globally.

A useful discipline is to run the tester twice — once at your realistic budget and once at double it — and compare. A strategy whose equity curve merely flattens is paying costs; one that inverts was made of costs. That sensitivity check takes minutes and has killed more fragile systems than any indicator tweak.

Slippage in MetaTrader, and measuring your own

MetaTrader is less accommodating: neither the MT4 nor the MT5 strategy tester exposes a first-class slippage input the way Pine's strategy() does. You have three honest workarounds.

First, widen the spread in the tester. MT5 lets you set a custom spread for a test run instead of using the recorded one. Since spread and slippage are both adverse price adjustments at fill time, adding your slippage budget to the spread is a crude but directionally correct model — with the caveat that it charges entries and exits symmetrically rather than concentrating pain on stops.

Second, model it in the EA itself. In MQL5 you can offset your intended stop and entry levels by a configurable number of points before sending orders in the tester, or post-process the tester's deal history to re-price fills. This is more work but lets you punish stop fills specifically, which matches reality better.

Third — and this applies whatever platform you test on — measure your live slippage. Every filled order in your broker history has a requested context and an executed price. On MT5, iterate your deals with the history functions and compare DEAL_PRICE against the order's trigger or request price; on any platform, even a manual spreadsheet over a few dozen trades beats guessing. Segment the results by order type and time of day: stops versus market entries, news windows versus quiet hours. That segmented table is your slippage model, and it is worth more than any generic number in an article — including this one.

The conclusion is the same everywhere: a backtest is a historical description under assumptions, and fill quality is one of the assumptions. Make it explicit, make it pessimistic, and re-validate whenever your broker, size, or session mix changes. Educational only; no fill model turns a backtest into a forecast.

Key takeaways

Educational only — not financial advice. Trading involves substantial risk of loss.

Catch the bug that compiles.Run auditGet Pro