What is slippage? Why a fill differs from the chart price

By Oalgo · Last reviewed

Slippage is the difference between the price a trade was expected to fill at and the price it actually filled at. It is usually small. In a test it is counted as a cost: you enter a little higher and exit a little lower than the chart price.

Why does slippage happen?

#
  • Price moves between the moment a rule acts and the moment the order fills.
  • An order bigger than what is waiting at the quoted price fills at several prices, and the average is worse.
  • It tends to be larger when price moves fast or when few orders are waiting.

How does a backtest count slippage?

#

A backtest cannot see real orders, so it adds a fixed percentage. In the test settings of Oalgo this is Slippage + funding %, and it starts at 0.03%. You can set it from 0% to 1%. The test applies it on entry and on exit, to every trade. A long trade enters at the chart price plus the slippage and exits at the chart price minus it. The report shows the total as Slippage, a cost, next to the Fees.

Made-up example with 1% slippageValue
Chart price at entry100
Entry price in the test100 × 1.01 = 101
Chart price at exit110
Exit price in the test110 × 0.99 = 108.9
Cost of slippage on this trade(110 − 100) − (108.9 − 101) = 2.1

What can a backtest not tell you about slippage?

#
  • A fixed percentage is a guess. Real fills differ from trade to trade, and they can be worse in a fast move.
  • A larger order can slip more than a small one.
  • Rules that trade often pay slippage more often. Try a higher Slippage + funding % than the default and see whether the report still holds up.
  • Neither a backtest nor a forward test places a real order, so neither shows what a real fill would have been.

The backtest report guide shows where Slippage and Fees sit among the other numbers.

Read next