TL;DR. Markets don't have one price — they have a bid and an ask, and the difference between them is the cheapest possible cost of any round-trip trade. Slippage is what you pay on top of that when your order is larger than the liquidity at the touch. For most strategies, slippage is the single biggest hidden cost, and ignoring it in backtest is the most common reason "profitable" systems lose money live.
What you'll be able to do
- Estimate the realistic round-trip execution cost on any instrument you trade.
- Pick the right order type for the situation — market, limit, or stop — knowing the trade-off each one makes.
- Configure realistic fill modeling in the backtest engine so the numbers you see resemble what you'll get live.
Why this matters
A strategy whose backtest shows an average profit of 2 ticks per trade looks profitable. After accounting for the 1-tick spread (paid on entry and exit) and 1 tick of slippage on each side, the actual edge is negative 1 tick. The backtest never showed the friction; the live account discovered it.
This happens constantly. The fix is straightforward — use realistic execution assumptions from day one — but it requires giving up the dopamine hit of seeing inflated backtest numbers.
The core idea
Every liquid market has two prices, not one:
- The bid is the highest price any buyer in the order book is willing to pay right now.
- The ask (or "offer") is the lowest price any seller is willing to accept right now.
The spread is the gap between them. Spreads are tight in liquid instruments (MES typically 1 tick, ES 1 tick, NQ 1 tick, AAPL 1 cent during regular hours) and wide in illiquid ones (low-volume options, off-hours futures, thinly-traded crypto pairs).
When you submit a market order to buy, you're saying "fill me immediately, I don't care at what price." You pay the ask. When you sell with a market order, you receive the bid. Every market-order round-trip pays the spread, twice if you're entering and exiting with market orders.
When your order size is larger than what's available at the top of the book, the engine walks deeper:
- Top of the ask shows: 5 contracts at 4290.25
- Next level shows: 8 contracts at 4290.50
- Next level shows: 20 contracts at 4290.75
If you submit a market order for 12 contracts: 5 fill at 4290.25, 7 fill at 4290.50. Your average fill price is 4290.40, not 4290.25. That extra 0.15 points on top of the original quote is slippage. It's not a backtest error — it's the actual cost of demanding more liquidity than the book had at the touch.
The four components of execution cost
When you total the real cost of getting in and out of a position, you're paying:
- Spread. The bid/ask gap. Paid by anyone who crosses the spread (market orders, marketable limits).
- Slippage. The cost of needing more size than top-of-book.
- Commission. What your broker charges per fill. For MES, typically $0.31–0.87 per side at retail brokers.
- Exchange fees. Often bundled into commission; sometimes itemized separately.
A round-trip MES trade at most retail brokers costs roughly $1.40–2.20 all-in even with zero slippage. Strategies whose average profit per trade is less than this are not strategies — they're slow ways to donate money to your broker.
How AlgoLift handles it
The backtest engine ships with three slippage modes:
- None. Fills at the trigger price exactly. Useful for the first ten seconds of debugging a strategy graph. Useful for nothing after that.
- Fixed ticks. Adds N ticks of slippage to every market-order fill. Crude but transparent. Reasonable for prototyping, where you want to see how sensitive your strategy's PnL is to a flat penalty.
- Realistic. Walks the book using actual historical depth at each price level. If the book had 5 contracts at the touch and you sent 12, the engine fills you the same way the exchange would have. This is the only mode you should use for decision-grade backtests.
There's also a separate Simulate Fills toggle that controls limit-order behavior. With it on, your limit orders only fill when the actual historical volume that traded after your price level was reached cleared the orders that were ahead of yours in the queue. The order types & fills page covers the rules in detail.
Order types and what they cost
| Order type | Guarantees | Doesn't guarantee | Typical use |
|---|---|---|---|
| Market | Execution | Price | Entry/exit when you must be filled. Pays full spread + slippage. |
| Limit | Price | Execution | Entry/exit when price control matters more than certainty. Pays no spread if filled, but might not fill at all. |
| Stop | Becomes a market order once triggered | Price (slippage on triggering is common, sometimes large) | Stop losses, breakout entries. |
| Stop-limit | Becomes a limit order once triggered | Execution | Same as stop, but won't slip past the limit. Risk: doesn't fill if the market gaps past. |
The choice between market and limit is the most consequential execution decision in any strategy. A few rules of thumb:
- Market orders for stops. A stop loss must execute. The cost of slipping a few ticks is much smaller than the cost of staying in a losing trade because the limit didn't fill.
- Limit orders for entries when patience is fine. If your strategy is a mean-reversion entry at an extreme, you usually have time. Place a limit a tick or two inside the touch; if you don't get filled, the trade wasn't there.
- Market orders for entries when timing is critical. If your strategy is a momentum breakout, you need the trade. Trying to save a tick with a limit will routinely leave you watching the breakout run without you.
A worked example
The same MES 5m strategy run with three execution assumptions on the same 5-year window.
Same strategy, three execution models — three different realities
What this shows. Column (a) is the strategy on paper. Column (c) is the strategy you'd actually have run. The gap between them is the cost of pretending markets don't have friction. Most strategies that look great in column (a) are mediocre in column (c), and some are losers. Always test in column (c) before committing capital.
Common misunderstandings
- "Slippage doesn't matter for swing trades." It matters less per trade, but if you compound 8 ticks of round-trip cost over 50 trades a year, that's 400 ticks ($2,000 on MES) you've donated to your broker. Real money at any holding period.
- "I can avoid slippage by always using limit orders." Maybe — but you'll also miss trades. The right comparison is the average outcome including both filled and missed trades. For some strategies (breakouts, momentum), missed trades are more expensive than the slippage you'd have paid.
- "My backtest accounts for slippage." Only if you turned it on. The default in most platforms (and the default mistake in self-coded backtests) is fills at the trigger price exactly. Check your settings.
Where slippage hurts most
- Scalping strategies. Average profit per trade is small; slippage is comparable in size. The strategy with a backtested 2-tick average profit usually has a real-world 0-tick or negative average.
- News-event trading. Spreads widen and depth thins during news. Slippage on a strategy that fires around FOMC or NFP can be 3–10× normal.
- Off-hours futures. ES and MES are far less liquid at 3 AM ET. A market order that pays 1 tick of slippage at 10 AM might pay 4 at 4 AM.
- Low-volume contract months. Front-month MES is liquid; back-month MES is not. Trading the "current contract" matters — and the backtest engine handles roll automatically.
Where slippage hurts less
- Long-horizon strategies. A 4-tick slippage cost on a trade you held for two weeks is rounding-error against the move.
- Liquid mainstream futures during RTH. ES, MES, NQ, MNQ, GC, CL during 9:30–16:00 ET have deep books and tight spreads. Realistic slippage is usually 0–1 tick at retail size.
- Strategies whose edge is regime, not micro-timing. A momentum strategy that wins by 8R when it wins doesn't care about a tick of slippage.
The cost of trading is the spread plus slippage plus commission. None of those are zero in real markets. A backtest that ignores them is a chart you can't act on. A backtest that includes them honestly is the single closest estimate you have of what live performance will look like.
Pro pattern: budget slippage like a commission
The most reliable mental model: treat slippage as a fixed cost per trade, exactly like commission. For MES day trading, budget 1 tick of slippage per side (so 2 ticks round-trip, $2.50 in dollar terms). Add it to your commission. Now you have an "all-in cost per trade" you can subtract from any strategy's average win before deciding whether the edge survives.
How this fits the workflow
You design in the Visual Builder, set realistic costs in the Backtest Engine, interpret in Analytics, and verify against real broker behavior in forward testing. The deeper coverage of fill mechanics lives in tick vs. bar data, order types & fills, and latency execution modeling.