The lie hidden inside daily bars
OHLC is a story your backtest tells itself
The convenient lie
Almost every backtesting engine has to guess the answer to a vitally important question: within this bar, in what order did price visit the high and the low? While many traders don’t even think about this and just leave their backtesting engine to guess, others believe that they have given this due consideration and have concluded that there is no problem with this approach. But are they right?
A daily bar gives you four numbers (open, high, low, close) and nothing about the journey between them, yet the order of that journey often decides the trade. If you were long with a stop below and a target above, and both sat inside the day’s range, then “low first” and “high first” are the difference between a losing trade and a winning one, and four numbers can’t tell you which happened.
So engines reach for a heuristic, an old and widely used one that sounds reasonable:
- If the open is in the bottom half of the range (
O < (H+L)/2), assume the path was O → L → H → C (the low made first). - If the open is in the top half, assume O → H → L → C (the high made first).
TradingView’s strategy tester, for one, documents exactly this rule. It’s a reconstruction after the fact, because it uses the day’s high and low, which weren’t known at the open, so it says nothing about forecasting. The question is whether it reconstructs the day correctly, and which way it pushes a backtest when it doesn’t.
The data
We used the front-month contract of six CME futures (the E-mini S&P 500, the E-mini Nasdaq-100, WTI crude oil, gold, the euro, and the 10-year Treasury note) from 7 June 2010 to 20 October 2026, as one-second bars built from every trade. A bar exists for each second with at least one trade and holds that second’s first, highest, lowest, and last price. So the day’s true high and low are in the data, and their order is known whenever they were first reached in different seconds, which they were on every day. Trade dates run from 17:00 to 16:00 Chicago time, so the Sunday evening session belongs to Monday, and the front month on each date is the contract with the most one-second volume:
| Market | Trade dates | One-second bars | Median bars per trade date | Contracts |
|---|---|---|---|---|
| ES | 4,216 | 151.8 million | 34,604 | 67 |
| NQ | 4,216 | 146.6 million | 35,322 | 67 |
| CL | 4,213 | 124.1 million | 28,752 | 198 |
| GC | 4,211 | 108.9 million | 25,119 | 82 |
| 6E | 4,215 | 75.6 million | 17,477 | 67 |
| ZN | 4,219 | 51.0 million | 11,808 | 66 |
Trade dates with at least 500 one-second bars (one or two per market have fewer and are left out); a 23-hour session has 82,800 seconds, and the median ES date traded in about 42% of them.
To check the one-second bars against the real tape, we compared them with every trade on 18 trade dates in 2026, in all six markets. The high and the low came in the same order in both on all 108 market-days, and for the brackets we test below, the first-touch order of the stop and the target matched on 97% to 100% of the days that reached both.
Right four days in five, and so is a random walk

Across the six markets, the heuristic called the order of the high and the low correctly on 80% to 83% of days (79.6% in ES). Always guessing the more common answer would get you 50% to 53%. When the open was in the bottom tenth of the day’s range, the low came first on about 98% of days in every market, and when it was in the top tenth, the high came first on 96% to 98%. With the open between 45% and 55% of the way up the range, which happened on about 9% of days, the heuristic was right on 51% to 57%, a coin toss.
We first read that pattern as a sign of trend days, but a driftless random walk produces it too. On 20,000 simulated random walks of 8,192 steps each, the same heuristic was right 81% of the time, with the same climb from about 3% to 97% across the deciles and 54% in the middle. The open sits near the low on a day that ended up rising, and on such a day the low was usually made early, whether or not anything about the market is predictable. We also shuffled each market’s own one-second price changes into a random order within each day. That brought accuracy down to between 63% and 79%, but the shuffle also removes the back-and-forth between bid and ask in consecutive changes, which widens the day’s range, so it’s a rougher benchmark than the random walk. Nothing in the markets beats the random walk by more than two points, so the heuristic’s accuracy is mostly a property of paths in general.
The order of the extremes isn’t the order of your trade
Getting the high and the low in the right order sounds like most of the battle, but a real trade’s stop and target rarely sit at the day’s extremes. They sit somewhere inside the range, and inside it the extremes say much less.

On 8 January 2025, ES opened in the upper half of its range, so the heuristic assumes the high came first, and that day it really did. But a long at the open with a stop 7.25 points below and a target 14.5 points above was stopped out eight minutes into the session, three hours before the market reached the target. The heuristic gets the extremes right and still books the trade as a winner.
To measure this, we took a long at the open with a stop and a target a fixed distance away, both active from the open, as a one-cancels-other bracket. The distances are a share of the median daily range over the previous 20 trade dates (the “typical range”), so they’re set before the trade. On the days that reached both, the true order comes from the one-second bars and the heuristic’s from the open’s position, and a trade that reached neither closes at the day’s close.

The narrower the bracket, the closer the heuristic gets to a coin toss. With the stop and target 5% of the typical range from the open, both were reached on about 90% of days, and the heuristic named the first one correctly on 51% to 53% of them. At 10% it was right on 52% to 56%, at 20% on 54% to 59%, and only at 50%, where both were reached on fewer than one day in ten, did it get to 59% to 72%. On the same days, its answer for the extremes was right 64% to 81% of the time. A narrow bracket is decided by the first wiggle after the open, and the open’s position in the day’s eventual range says little about that. The random walk shows the same thing (53% at 10%).
Most traders probably instinctively know this but conveniently ignore it when backtesting their ideas, usually for reasons no more complex than their data provider not letting them.
Which way the errors push
Every heuristic error on a bracket is either a false win (the target booked when the stop came first) or a false loss (the reverse). With the stop and the target the same distance from the entry, the two were equally common, about 18% of days each at 10% of the typical range, and the average result per trade moved by between −0.02 and +0.01 of the stop distance, which is noise, so the trouble only starts when the two distances differ.

The heuristic decides the order from the open’s position alone and ignores how far each level is from the entry, while the real path reaches the nearer level first more often than not. With the stop at 10% of the typical range and the target twice as far, false wins (16% to 17% of days) outnumbered false losses (10% to 12%). The heuristic added between 0.16 and 0.19 of the stop distance to the average trade in every market, with 95% intervals of about ±0.05. At 5% it added 0.35 to 0.47. In ES at 10%, a bracket that made 0.02 of the stop distance per trade on the real path showed 0.19 under the heuristic. If you turn the bracket round, with a wide stop and a tight target, then the heuristic understates the result by about as much, 0.16 to 0.20 at 10%. From 30% of the typical range outwards, the effect is a few hundredths either way. A random walk gives +0.13 and −0.16 for the same two brackets, so this too is geometry, and it’ll be there in any market.
That makes the error’s direction a property of the strategy. An optimiser picking among our 15 brackets (five distances, and targets half, equal to, or twice the stop) by their heuristic result chose the tightest stop with the target twice as far in all six markets, where the heuristic showed +0.30 to +0.36 of the stop distance per trade. On the real paths, that bracket made between −0.12 and +0.01 and ranked 12th to 15th of the 15, so the bracket the heuristic flattered most was the one the optimiser picked.
Limits that only touched
A daily bar can’t say whether a resting limit order filled. Many engines fill it if the day’s range reached the limit, including when the low was exactly at a buy limit and the market never traded below it. Others, such as TradeStation, can be set to require a trade through the limit, or a given volume or number of trades at it. A touch isn’t proof that the order didn’t fill (that depends on the queue), but those fills are the doubtful ones. They’re rare: with a buy limit 10% of the typical range below the open, 0.4% to 1.2% of the fills a touch rule books were touches only, and 4.8% in ZN, whose ticks are large relative to its range. Each of them buys the day’s low, though, so for a trade closed the same day they can’t lose, and they added between 0.03 and 0.10 of the stop distance to the average fill in five markets, and 0.33 in ZN. Over a longer hold such a trade can lose, but it still starts at the best price of the day.
Gaps through a stop
A daily bar does show a gap at the open. If a stop held overnight sits above the next open, the bar says so, and an engine that fills such a stop at the open, as TradingView documents, gets it right. One that fills at the stop price doesn’t: for a long held from one session’s close to the next with a stop 10% of the typical range below the close, filling gaps at the open at the stop flattered the average stopped trade by 0.05 to 0.14 of the stop distance. The worst gaps were hundreds of ticks, 494 in ES and 1,892 in NQ. What a daily bar can’t show is a jump through a stop during the session, and in these markets that’s small: under 2% of stops slipped at all, except in the euro (9%), and the cost was about 0.01 of the stop distance.
What the bar can’t tell you, and what the engine assumes
What a daily bar can’t tell you is the order of events inside it and how much traded at each price. What an engine assumes to fill that gap varies: TradingView documents the open-position heuristic, fills at the open after a gap, and can read lower-timeframe bars inside each bar, and TradeStation offers several limit-fill rules and a look-inside-bar mode. And what we tested is neither platform: we applied the heuristic and two simple fill rules (fill on a touch, fill a stop at its price) to the bars ourselves and measured the difference from the one-second path. The numbers above describe those rules, and any engine that uses them.
So is the heuristic good enough?
It depends on what the strategy needs from the path, more than on who’s running it. A strategy whose stops and targets are wide relative to the day, about half the typical range or more, rarely has both inside one bar. At that width both were reached on fewer than one day in ten, and the heuristic moved the average trade by less than 0.04 of the stop distance in every bracket we tested at that width. Close-to-close strategies, and those that trade at the open with stops that a daily bar can see being gapped, need little more than the bar.
Strategies with brackets inside a typical day’s range need the path, and above all when the stop and target distances were chosen by optimising on a daily-bar backtest, because that’s where the heuristic adds a sixth of the stop distance to every trade at 10% of the range. Limit entries need at least a trade-through rule, and trailing stops and re-entries, which we didn’t test, depend on the path even more. For size large enough that queue position matters, trades alone aren’t enough: you need order-level data, which CME publishes as market by order, and even then assumptions about latency and your own effect on the book.
The lesson
It feels reassuring to know the guess is right four days in five, but a random walk does as well, and that’s the accuracy for a question most trades don’t ask. For a stop and a target near the entry, the heuristic is close to a coin toss, and its errors favour whichever level is further away. They don’t average out as you add days, and an optimiser will find them.
Know what your backtest assumes, and measure the direction of its errors as well as their rate, for the brackets you actually trade. And when there’s real capital riding on what happened inside the bar, stop guessing the path. The data is out there; you just have to get serious enough to go and get it.
Method note. Data: front-month one-second bars from the marketfeed archive, cleaned of isolated prints far from the market (the same cleaning as our round-numbers study); trade dates with fewer than 500 bars are left out. Extremes: the first one-second bar whose high (low) equals the day’s high (low); the heuristic guesses high first when the open is at or above the middle of the range; deciles are fixed bins of the open’s position (0 to 10%, 10% to 20%, and so on). Brackets: a long at the open, with the stop and target active from the open, the stop k times the median daily range of the previous 20 trade dates away (k = 5%, 10%, 20%, 30%, 50%), and the target 0.5, 1, or 2 times as far. A day that reached neither is closed at the close, and days where both levels were first reached in the same second are ties and are left out (up to 1.4% of days with the narrowest brackets, 3% to 4% in ZN, and almost none from 10% outwards). A level is reached by the first bar whose low (high) is at or through it, and a stop fills at its price unless that bar opened past it. Overnight stops use the previous close and require the same contract on both days. Results are in units of the stop distance; intervals are 95%, from the standard error across days. Random walks: 20,000 paths of 8,192 Gaussian steps, rounded to whole ticks, scored the same way. Tick check: every trade on 18 trade dates in 2026 from Databento. On five of the 108 market-days the tick data’s high or low differed from the one-second bars, because of a roll day or a stray print removed by the cleaning, and the order of the high and the low agreed on all of them.