A backtest can fill your limit order even when no tradeable opportunity existed. If a bar’s low crossed your buy limit, many engines count a fill. But the low only tells you that at least one reported trade occurred at that price or below. It says nothing about how much traded, what was queued ahead of you, or whether your order was live in time.
That distinction matters most when the strategy’s edge depends on frequent passive fills. A model that treats every price touch as a complete fill can turn a patient entry into an imaginary source of alpha.
Does a bar touching my limit price mean my order filled?
No. It means the bar’s recorded price range included your limit. Whether your order could fill depends on the market’s order book, trade flow, your queue position, and when the order arrived.
Imagine a buy limit at $100.00. The bar opens at $100.20, reaches a low of $99.98, and closes at $100.10. A trade may have printed two cents through your price, but if $100.00 had a large queue ahead of you and only a small amount traded there, your order might remain untouched. With OHLCV alone, you cannot see that queue.
There’s another wrinkle: a bar aggregates events over time. If your signal is calculated from that bar’s close, you cannot assume your order was resting earlier in the bar when its low occurred. The bar compresses the sequence that would answer the question.
What can OHLCV data actually tell me about a limit fill?
OHLCV can rule out some fills and make others plausible. It cannot establish queue priority or guarantee the amount available to your order.
| Observation | What it supports | What it cannot prove |
|---|---|---|
| Bar low stayed above a buy limit | No reported trade reached the price during that bar | That the order would fill |
| Bar low touched the buy limit | The price was reported at the limit | That any volume traded after your order arrived |
| Bar low moved below the buy limit | Trades occurred at or below the price | That enough volume reached your queue position |
| Total bar volume exceeded your order size | The market traded at least that much somewhere in the bar | That the volume traded at your price, after arrival |
So a bar-based engine needs a fill assumption. Treat that assumption as a model with a known blind spot, not as a fact extracted from the candle.
How should I model limit order fills in a backtest?
Start with order timing. Decide when the signal becomes available, when the order reaches the venue, and which subsequent market events can interact with it. For a signal known at bar close, a conservative bar-based rule is to make the order eligible from the next bar onward.
Then separate price eligibility from fill quantity. A limit becoming eligible to trade does not mean the whole order fills. If you have trade prints but no order-book history, you can require traded volume at the limit or better to exceed a multiple of your order size. That multiple is a rough queue buffer, not a universal constant. Test several values and report how the result changes.
For example, suppose the strategy places a 2 BTC buy limit and the chosen price trades 3 BTC after the order is eligible. A model requiring 5 BTC of qualifying volume would leave it unfilled; a model using a 1.0 volume multiple would fill it. Neither result reconstructs the queue. The comparison shows how much the strategy depends on an assumption you cannot observe.
Keep unfilled orders in the simulation. Cancel them when the strategy would cancel them, and allow the missed trade to stay missed. Giving a strategy a fill whenever its limit is touched, while ignoring orders that expire untouched, biases both execution and opportunity count.
When do I need order-book data?
Use order-book updates and trades when queue position or partial fills are central to the strategy: market making, short-lived passive quotes, or entries that depend on being near the front of a crowded price level. Even then, historical public data may not reveal your exact position in the queue. You need to model order arrival, cancellations ahead, matching rules, and your own market impact.
For slower strategies, detailed books may add complexity without resolving the main uncertainty. A useful bar-based study can still compare a touch-fill upper bound with stricter volume-gated scenarios. If the apparent edge disappears as soon as you demand plausible fills, that is valuable research information.
How can I tell whether my result depends on optimistic fills?
Run the same strategy under a small set of explicit fill rules and compare more than the final return. Track filled order count, partial-fill rate, time resting, canceled quantity, missed moves after non-fills, and turnover. A strategy can preserve its headline return while relying on dramatically fewer, more convenient trades.
Paper trading is the next useful check: submit the actual order logic and record acknowledgements, fills, and cancellations. Paper fills still depend on the venue or simulator’s own rules, but they test timing and order handling that a candle cannot show.
A touched limit is evidence about price. A fill is a claim about execution. Your backtest should make the gap between those claims visible.
← All posts


