OHLC Bar Data
OHLC bar data summarises each time period into just five numbers — open, high, low, close and volume — which is enough to plot price but discards the intrabar path, so a backtest that assumes it knows when the high or low occurred can manufacture fills that never happened.
Quick answer: OHLC bar data summarises each time period into just five numbers — open, high, low, close and volume — which is enough to plot price but discards the intrabar path, so a backtest that assumes it knows when the high or low occurred can manufacture fills that never happened.
In simple words
An OHLC bar is a compressed summary of everything that traded in a period: where price opened, the highest and lowest it reached, where it closed, and how much volume changed hands. It is the most common data format for backtesting because it is compact and freely available. The catch is that a bar tells you the four corners of the period but not the order in which price visited them, and that missing path is where many backtest errors hide.
Purpose
OHLC bars exist because storing every tick is expensive and unnecessary for most research; they give a faithful outline of price action at a chosen resolution. Understanding what they omit is the first step to not being fooled by a backtest that trusts them too literally.
Professional explanation
What a bar actually stores
A single OHLC bar aggregates a fixed time window — one minute, one day, one week — into four price points and usually a volume figure. The open is the first trade of the window, the close is the last, and the high and low are the extreme prices touched anywhere inside it. On NSE a daily equity bar might read open 24,900, high 25,120, low 24,850, close 25,060 on Nifty, with turnover attached. Those five numbers are exact, but they are a summary: the thousands of trades that produced them have been collapsed into corners of a box.
The intrabar path problem
The single most important thing a bar hides is the sequence in which price moved. Given a daily bar with a high above your target and a low below your stop, you cannot tell from the bar alone whether the high came first (target hit) or the low came first (stop hit). A backtest must assume an ordering, and a careless engine will assume the favourable one, booking the profitable exit on every bar where both levels were touched. This single assumption can flip a losing system into a winning one on paper while changing nothing about reality.
Which fills a bar can and cannot justify
A defensible OHLC backtest fills market orders at the open or close of a bar, because those two prices are unambiguous points in time. It becomes speculative the moment it fills at the high, the low, or any intrabar level, because the bar cannot prove that price was available at that level in the direction you needed at the moment you needed it. Stop and limit orders that trigger inside the bar are the danger zone: assuming a limit filled just because the low touched it, or a stop filled exactly at its level with no slippage, quietly overstates the strategy.
Resolution, aggregation and the close
The same instrument sampled at different bar sizes tells different stories, and a signal that looks clean on daily bars may be noise on five-minute bars. Aggregation also fixes a subtle timing fact: a daily close is only known after the session ends, so a rule computed on the close cannot be executed at that close in real life. The bar's tidiness invites the look-ahead error of trading on a value that was not yet final. Choosing the bar size is therefore a modelling decision, not a neutral data choice.
Volume and its own quality issues
The volume attached to a bar matters because it governs whether your assumed fill size was even plausible. A backtest that trades 500 lots of a Bank Nifty option in a bar whose real volume was 40 lots is fantasy, regardless of the price used. Volume figures also vary by source: some vendors report exchange volume, some include auction or block trades, some are adjusted for splits inconsistently with price. Treat the volume column with the same scepticism as the price columns before letting it gate position size.
OHLC bar data vs Tick data
| Aspect | OHLC bars | Tick data |
|---|---|---|
| Stores | Four prices plus volume per period | Every trade or quote as it happened |
| Intrabar path | Lost — only the four corners survive | Fully preserved |
| Storage cost | Small | Very large |
| Good for | Most swing and daily research | Intraday fills, microstructure, HFT |
| Main fill risk | Assuming favourable intrabar ordering | Correct but heavy to process |
Practical example
Illustrative example (Indian market)
You backtest a Nifty breakout system on daily OHLC bars with capital of Rs 5,00,000. On one day the bar is open 24,900, high 25,150, low 24,820, close 25,010. Your entry stop sits at 25,050 and your protective stop at 24,850, and both fall inside that day's range. The naive engine assumes the entry triggered at 25,050 and then price ran to the high, booking a gain. But the low at 24,820 shows price also fell below your protective stop that day; if the low came first you were stopped out for a loss before the breakout. On daily bars you cannot know the order, so the honest result must assume the adverse path or drop to intraday data. Re-running with the pessimistic ordering turns several such winners into losers and materially lowers the equity curve.
NSE and BSE distribute clean end-of-day OHLC for equities and indices, which is why most Indian retail backtests use daily bars. But F&O strategies on Bank Nifty, where a single bar can span a 300-point swing, are exactly the case where bar data is too coarse: the intrabar path decides whether the stop or the target was hit first, and only intraday or tick data can settle it.
Limitations
- A bar cannot reveal the order in which the high and low were reached, so intrabar fills are always assumptions
- Stop and limit fills modelled on bar extremes tend to be optimistic and understate slippage
- Volume is often inconsistent across vendors and may not support the position size a backtest assumes
- A daily close is only final after the session, so close-based signals invite look-ahead
- Bar size is a modelling choice that changes the signal, not a neutral property of the data
Common mistakes
- Assuming the favourable intrabar ordering so every bar that touches both target and stop is booked as a win
- Filling stop or limit orders exactly at their price with no slippage on a bar that merely touched the level
- Generating a signal from the close and then filling at that same close in the same bar
- Trading a size larger than the bar's real volume could have absorbed
- Treating high and low as tradeable prices rather than as extremes that were touched only momentarily
- Comparing results across bar sizes without realising the signal itself changed
Professional usage
Professional researchers treat OHLC bars as an approximation and encode explicit fill rules that a bar can actually support: market orders at open or next-bar open, and conservative handling of any order that triggers intrabar. When a strategy depends on precise intrabar sequencing — scalps, tight stops, breakout triggers — they drop to intraday or tick data rather than trust the bar. They also reconcile volume against assumed size and confirm that the same signal survives a change of bar resolution before believing it.
Key takeaways
- An OHLC bar is a five-number summary that keeps the corners of a period but loses the path between them
- The hidden path means intrabar fills are always assumptions, and careless engines assume the flattering one
- Fill market orders at open or close where timing is unambiguous; be sceptical of stop and limit fills at bar extremes
- Check that assumed size is compatible with the bar's real volume
- When precise intrabar timing matters, use intraday or tick data instead of daily bars
Frequently asked questions
What does OHLC stand for in trading data?
Why is OHLC data used for backtesting?
What information does an OHLC bar hide?
Why does the hidden intrabar path matter?
Can I fill a backtest order at a bar's high or low?
Is it safe to trade on a bar's closing price?
How does bar size affect a backtest?
Why does the volume in a bar matter for backtesting?
Is OHLC data enough for intraday strategies?
What is a candlestick versus an OHLC bar?
Where do I get OHLC data for Indian markets?
Do OHLC bars suffer from survivorship bias?
How should a backtest handle stop orders on OHLC data?
Why does my OHLC backtest beat live trading?
Voice search & related questions
Natural-language questions people ask about OHLC Bar Data.
What is an OHLC bar?
What does an OHLC bar not tell you?
Why can OHLC data make a backtest look too good?
Should I fill trades at the high or low of a bar?
Is daily OHLC good enough for intraday trading tests?
Why does the volume on a bar matter?
Sources & references
Last reviewed 12 July 2026. Educational content only — not investment advice. Markets and rules change; verify current conventions with SEBI, NSE/BSE and your broker.