# Slippage and fills

> Why the price you get can differ from the price you wanted, and how to allow for it.

Source: https://quantraider.com/learn/trading-costs/slippage

Course: Orders, spreads and costs (lesson 4 of 6) · Level: Beginner · 3 min

The price on the chart when you decide to trade is not always the price you get. Slippage is the difference, and learning when it occurs lets you allow for it in your plan and in your backtests.

## What slippage is

**Slippage** is the difference between the price you expected and the price at which your order actually filled. It can work against you or, occasionally, in your favour. It happens because the market moves between the moment you send an order and the moment it is executed, or because there is not enough size available at the price you wanted.

A market order is affected most directly. A stop order is also affected once triggered, because it then turns into a market order. A limit order fills at your price or better, so it cannot slip against you, but it may not fill at all.

## When it gets worse

- Around scheduled news and data releases, when prices jump and spreads widen.
- In thin markets, such as outside the main trading sessions or for less liquid instruments.
- With large order sizes that need several price levels in the book.
- Over gaps, such as the weekend open, where price can reopen well beyond a stop.

**Worked example: Slippage on entry and on a gapped stop**

1. A market buy is sent when the ask is 1.0852 but fills at 1.0855. Entry slippage = 3 pips.
2. With a 15-pip stop, that is 3 / 15 = 0.2R of extra cost on the entry alone.
3. Later, a long trade has a stop at 1.0832, 20 pips below its entry of 1.0852. Price gaps and the stop fills at 1.0827.
4. The loss is 1.0852 - 1.0827 = 0.0025, which is 25 pips. As a multiple of the planned 20-pip risk, that is 25 / 20 = 1.25R.

A 3-pip slip costs 0.2R on a 15-pip stop, and a gapped stop turns a planned 1R loss into a 1.25R loss.

## Allowing for it

You cannot predict slippage on a single trade, but you can plan for its average. A common approach is to assume a fixed number of pips of slippage on every fill in a backtest, add it to the spread and commission, and see whether the results still hold. If a strategy only works with zero slippage, it is fragile.

**Worked example: Adding an assumed slippage**

1. Assume 0.5 pip of slippage on entry and 0.5 pip on exit, so 1 pip in total.
2. Add it to the earlier costs: 1.2 pips spread + 0.7 pip commission + 1.0 pip slippage = 2.9 pips.
3. With a 12-pip stop, cost in R = 2.9 / 12 = 0.2417, about 0.24R.

Costs including slippage take about 0.24R from every trade on a 12-pip stop.

> **Reduce it, do not pretend it away**
>
> Wider stops, avoiding trading right at major news, using limit orders where a missed fill is acceptable and keeping size modest all reduce the effect of slippage. None removes it entirely.

> **Inspect individual fills**: The Backtest tab replays trades one by one on the chart, which makes it easier to see how entries and exits relate to the candles around them. [Open your strategies](https://quantraider.com/strategy)

## Key takeaways

- Slippage is the difference between the expected and the actual fill price, and it can be favourable or unfavourable.
- Market orders and triggered stops are exposed to it; limit orders are not, but they may not fill.
- It is worst around news, in thin markets, with large size and across gaps.
- Assume a realistic slippage in your tests and check that the strategy still works with it included.

> Educational content, not financial advice. Trading involves risk of loss.
