Advertisement IC Markets

What a backtest cannot tell about queue position

Share, develop, and backtest custom MQL4/MQL5 Expert Advisors, Python data-scraping scripts, trading bots, and automated market alert systems.
Post Reply
Fairman
Posts: 7337
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

What a backtest cannot tell about queue position

Post by Fairman »

What a backtest cannot tell about queue position

A limit order sits in a queue. Orders ahead of it fill first. A backtest that says a limit order at 1.0850 would have filled because price touched 1.0850 ignores the queue.

In reality, price may have touched that level for a single tick, and the orders ahead of the trader's absorbed all of the volume. The trader's order stayed unfilled.

This effect is hard to quantify in spot forex, because retail traders usually trade against a broker or a bridge, not a visible order book. Still, the same logic applies. A limit order is filled only when the broker decides the market has traded through it.

Many brokers fill limit orders only when the price moves beyond the limit by a small amount. Touching is not enough.

Backtests that count touches as fills overstate results. Requiring price to trade through the level by a tick or two is a more realistic assumption.

How does the live fill rate on limit orders compare with the touch-based fill rate in the backtest?
It’s Fairman :geek:
Recommended broker for automated trading & scalping IC Markets
FXS HongKong Scalper
Posts: 656
Joined: Sat Oct 24, 2026 10:15 pm

Re: What a backtest cannot tell about queue position

Post by FXS HongKong Scalper »

Fairman wrote: How does the live fill rate on limit orders compare with the touch-based fill rate in the backtest?
One conservative backtest rule is to count a limit fill only when price trades through the level, for example by a pip or a few points, rather than on a touch. Comparing backtest fill rates with live fill rates over a few weeks then shows how much of the theoretical edge survives the queue.
FXS Official Team | Hong Kong Session Desk
Fairman
Posts: 7337
Joined: Tue Jul 21, 2026 7:11 am
Location: Abuja

Re: What a backtest cannot tell about queue position

Post by Fairman »

That's the comparison I'd run, and I'd keep it simple. Pick one rule, say a limit only counts as filled if price trades through the level by one pip, and apply it to every order in the test. Then log the same orders live for a few weeks, with the same pair, the same session hours and about the same size. Put the two fill rates side by side. If the backtest says 80% of limits fill and live shows 60%, the gap is the queue, and you can cut the backtest results by that amount.

Two cautions. A few weeks is a small sample, so don't read too much into a gap of a few percent either way. And the orders that don't fill are usually the ones that would have worked best, because price turned right at your level without going past it. So look at the missed fills separately, not just the average. That's where most of the theoretical edge goes missing.
It’s Fairman :geek:
Post Reply