DEV Community

xauusd
xauusd

Posted on Originally published at xauusdrobot.com

Slippage: The Execution Cost Your Backtest Pretends Doesn't Exist

Every trader eventually asks the same question: "why are my live results worse than my backtest?" The spread explains part of it. The other part is a cost that appears on no quote screen and in no simulation: slippage.

What slippage is

You send a buy on gold at 2412.50. The fill confirmation says 2412.87. Those 37 cents are slippage — the price moved (or the liquidity ran out) in the milliseconds between your click and the broker's execution.

Together with the spread, it forms your real execution cost:

  • Spread = the fixed toll, quoted upfront
  • Slippage = the variable toll, discovered only after the fill

The three causes

  1. Latency. Your order travels platform → broker → liquidity provider while the price keeps moving. From a home connection that round trip is 100–300ms — an eternity in a fast market.
  2. Thin liquidity. There wasn't enough volume at the quoted price, so part of your order filled deeper in the book.
  3. Gaps. After news or a weekend, price skips levels entirely. Your order fills at the next price that exists — which can be far from the one you wanted.

When gold slips hardest

Window Why
NFP / CPI / FOMC seconds Liquidity vanishes exactly when volatility explodes
Sunday open Weekend gap + thin books
Rollover (~21:00–23:00 GMT) Daily liquidity reset
Fast breakouts Everyone wants the same side; the slowest connection gets the worst fill

Notice these are the same windows where spreads blow out. Both costs spike together — avoiding those windows cuts both at once.

The stop-loss detail most people miss

A stop-loss is a trigger for a market order, not a guaranteed price. In a gap, it fills at the next available level — sometimes beyond the stop. A planned $5 stop can occasionally cost $5.80.

This is not an argument against stop-losses. The alternative to a slipped stop is an unbounded loss. It's an argument for (a) sizing positions so a slightly-worse fill is survivable, and (b) not holding through scheduled news.

Why your backtest doesn't show any of this

A standard backtest fills every order at the exact recorded historical price. Zero latency. Infinite liquidity. No gaps within a bar.

Real trading has none of those. That's the honest explanation for "great backtest, mediocre live" — the strategy didn't lie, the simulation just skipped two real costs. A viable strategy needs an edge big enough to pay spread plus realistic slippage and still profit.

Keeping it small

  1. VPS near your broker's server — cuts latency from hundreds of ms to single digits. The cheapest structural fix.
  2. Trade liquid hours — London–NY overlap has the deepest books.
  3. Never fire orders into news — a time/news filter costs nothing.
  4. Sensible lot sizes — oversized orders walk the book.
  5. Measure it — your MT5 journal logs requested vs filled prices. Audit a week of live trades; you'll know your real cost. Bonus check: with a fair broker, small positive slippage should also appear in calm markets. Negative-only fills are a broker quality warning.

Bottom line

Slippage can't be eliminated — price will always move while your order travels. But it can be managed down to a rounding error: fast connection, liquid hours, no news gambling, survivable sizing. Do that and the gap between backtest and live shrinks to something your edge can pay for.


Originally published at xauusdrobot.com, part of an execution-costs series with the full spread breakdown. Educational content, not financial advice — trading gold carries substantial risk of loss.

Top comments (0)