The Short Answer
A bar records four prices: open, high, low and close. It does not record the order in which those prices traded. Tick data records every trade print in sequence, so a backtest built on ticks knows what traded first.
For a strategy that acts only at bar close and holds for many bars, that missing order rarely matters. For a strategy with stops, targets, stop entries or trailing stops that can be touched inside a bar, it can decide which trades win and which lose. This guide shows where the difference comes from, how to tell whether your strategy is affected, and when bar data is good enough.
What a Bar Hides: One Worked Example
Take a hypothetical 5-minute bar. The numbers are made up to keep the arithmetic simple:
| Open | High | Low | Close |
|---|---|---|---|
| 100.00 | 101.50 | 99.00 | 100.25 |
You are long from 100.00 with a stop at 99.25 and a target at 101.25. Both levels sit inside the bar's range, so both were touched. The bar can't tell you which came first:
- Path A: open → high → low → close. Price reaches 101.25 first. The target fills and the trade is a winner.
- Path B: open → low → high → close. Price reaches 99.25 first. The stop fills and the trade is a loser.
Same bar, same orders, opposite outcomes. A bar backtest has to pick one path, and whichever it picks is an assumption, not a fact. Tick data removes the question: the trade tape shows whether 99.25 or 101.25 traded first.
How Bar Backtesters Deal With the Ambiguity
Every bar-based backtester needs a rule for bars like this. Common approaches:
- Assume a path from the bar's shape, for example treating the extreme closer to the open as the one that traded first.
- Assume the worst case, filling the stop before the target.
- Assume the best case, which flatters results and is the one to watch out for.
- Look inside the bar with lower-timeframe bars.
TradingView's Strategy Tester, for example, offers a Bar Magnifier mode, which TradingView describes as using intrabar inspection for more realistic order fills. Lower-timeframe bars shrink the problem, but they don't remove it: a 1-minute bar can still contain both your stop and your target. TradingView Strategy Tester Limitations covers the tester's other default assumptions.
Whatever tool you use, find out which rule it applies. If you can't, assume your results depend on it.
Other Places Where Intrabar Detail Changes Results
Stop-and-target bars are the most visible case, but not the only one:
- Stop entries. A breakout strategy that buys on a stop above a level fills when price trades through that level. In a fast move the fill can be worse than the stop price. Bar data only tells you the level was crossed somewhere inside the bar.
- Trailing stops. A trail follows new highs or lows. With bars, you don't know whether the new high came before or after the pullback that would have hit the old trail level.
- Entry and exit in the same bar. If a trade can open and close inside one bar, bar data has to guess both events and their order.
- Tight stops and targets. The smaller your stop and target are compared with a typical bar's range, the more bars contain both, and the more trades depend on the assumption.
- Limit orders. Tick data shows that a price traded, but not your place in the queue. A backtest that fills a limit order whenever price touches it is optimistic even on ticks.
- Order size. Neither bars nor ticks show how much size was available at each price. For larger orders, order-book (depth) data shows how far a market order would walk the book.
When Bar Data Is Good Enough
Bar backtests are fast, and speed matters when you're discarding weak ideas. Bar data is usually fine when:
- signals are evaluated at bar close and orders go out as market orders;
- trades hold for many bars, on hourly or daily timeframes;
- stops and targets are wide compared with a typical bar's range;
- you're in early research and only want to know whether an idea deserves a closer look.
A quick test tells you whether your strategy is exposed: count the trades where the stop and the target both fall inside the same bar. If that's a tiny share of trades, the assumption barely moves the result. If it's a meaningful share, rerun with tick fills before you trust anything.
When You Need Tick Data
Use tick-level fills when:
- the strategy trades intraday with stops or targets that are small compared with bar ranges;
- entries are stop orders at a level, as in opening range breakouts;
- the strategy uses trailing stops;
- decisions happen inside the bar, not only at bar close;
- you want to compare a backtest with live fills on the same days.
Tick backtests have costs of their own. There is far more data per day, so runs take longer, and optimizations take much longer because every trial replays the trade tape. Tick history also covers fewer symbols and dates than bar history.
A Practical Workflow
- Research on bars. Use fast bar backtests to drop ideas that fail even under generous assumptions.
- Measure the exposure. Count the ambiguous bars in the trade list, or check how many trades open and close within one bar.
- Rerun finalists with tick fills. Keep everything else identical: artifact, symbol, timeframe, date range, costs and parameters. Otherwise you can't tell what caused the change.
- Compare the two runs. If the results move a lot, the edge lived in the bar assumption.
- Check size with order-book data if your order size is large compared with typical depth, over a short window.
- Forward test on a demo account before risking money.
How Roboquant Handles Bar and Tick Fills
In Roboquant, you choose a fill model for every backtest, and the same compiled strategy runs under each one:
| Fill model | What drives fills | Good for |
|---|---|---|
| OHLCV | Bar-level simulation | Fast research, hourly and daily systems |
| Tick | The historical trade tape | Intrabar entries, stop loss, take profit and trailing stops |
| Order Book (L2), bar | Market orders walk the depth snapshot at the bar event | Bar strategies where liquidity and order size matter |
| Order Book (L2), tick | Tick timing plus depth-walked market fills | Short-window execution research |
A few details worth knowing:
- Bar logic, tick fills. A strategy that decides at bar close runs under any fill model. You can keep its bar-close logic and still have its stops and targets fill on the trade tape.
- Decisions inside the bar need a strategy that opts in to ticks. In tick mode, the forming bar only contains what was known at that tick, and indicators read the last completed bar, so final bar values can't leak into earlier decisions.
- Replay shows entries and exits at their real point inside the candle when you replay a tick run. The Free plan includes a Replay preview; full Replay starts on Starter.
- Coverage and plans. Market data comes from CME today. Tick and order-book data are available only for supported symbols and covered dates, and order-book history is a recent window meant for short studies. Tick-level fills start on Starter and order-book fills on Elite; history depth also depends on your plan. See pricing.
The backtesting docs cover fill models, Replay and the reproducibility checklist in detail.
Checklist
- Do you know which intrabar rule your backtester uses for bars that touch both stop and target?
- How many trades have both levels inside one bar?
- Do stop entries or trailing stops drive the strategy?
- Did you rerun your best candidates with tick fills, changing nothing else?
- Are commission and slippage set to realistic values in both runs?
- Did you check a handful of trades on the chart, not just the summary?
Related Reading
- Why Your Backtest Doesn't Match Live Trading
- How to Backtest an Opening Range Breakout Strategy
- Understanding Sharpe Ratio, Drawdown & Key Metrics
- TradingView Strategy Tester Limitations
- Turn a Trading Idea into Code with AI
- Docs: Backtesting, Runtime reference
Try It
Build a strategy with Roboquant's AI, run it on bars, then rerun it with tick fills and compare.
Trading involves risk of loss. Backtest results are hypothetical and do not guarantee future performance.
