Reversal bar backtests: alternating bars and the trap of filling at the turn
A reversal bar chart alternates up and down bars: an up bar keeps extending while price makes new highs and closes only when price pulls back a set reversal size from its high, and the next bar is a down bar. Backtests overstate reversal bar strategies by filling at the bar's close, the exact point of the pullback, and by treating the bar's high as known before the pullback revealed it. AlphaPrime confirms each bar at the close of the underlying bar, fills at the next real price with doubled slippage, and judges stops on the real high and low.
By Soren Huang · Published · updated · Editorial policy
Contents
- What are reversal bars, and why do their backtests look better than they trade?
- How is a reversal bar built, and when is its high actually known?
- Where does a reversal bar backtest see the future?
- Filling at the turn
- Treating the extreme as known early
- Stops on swing bars
- How does AlphaPrime backtest a reversal bar strategy?
- How do you choose bar size and reversal size for a backtest?
- Which markets and strategies suit reversal bars?
- Frequently asked questions
What are reversal bars, and why do their backtests look better than they trade?
Reversal bars are price bars that alternate direction: an up bar keeps extending while price makes new highs and closes only when price pulls back a set reversal size from that high, and the bar after it is always a down bar. Their backtests look better than they trade because the bar closes at the exact point of the pullback, and engines fill there.
A reversal bar chart has one essential setting and one optional one. The reversal size is the pullback, in ticks or points, from the bar's extreme that closes the bar and starts the opposite one; the optional minimum bar height stops a bar from closing before it has covered at least that much ground. A close relative is the momentum bar, which also continues while price moves one way and flips on a set counter-move; the construction differs in detail, and the backtest leaks are the same. Time does not appear on the chart; a reversal bar can last seconds in a fast market or an hour in a quiet one.
Traders use reversal bars because every bar is a swing: the high of an up bar is a local top by construction, the low of a down bar is a local bottom. That makes swing-based rules trivial to write. It also means that every bar's defining feature, its extreme, is identified by what happened after it. The rules shared by every synthetic chart type are on the overview of why synthetic-bar backtests cheat; this page is the reversal-bar-specific part.
How is a reversal bar built, and when is its high actually known?
An up bar's high is known only when price has fallen the reversal size below it, which is also the moment the bar closes. Until then, any new high extends the bar and the previous high is forgotten. The bar's two most important prices, its high and its close, both become known at the same instant, and that instant is the close.
Consider what that means for a chart replaying history. The finished chart shows an up bar from 100 to 112 closing at 108, then a down bar. It looks as if a trader could have seen the top at 112 and acted on the turn. In fact the top became a top at 108, when the pullback completed; at 112 it was just the latest high of a bar that might have kept going. A strategy that sells at the up bar's close is selling at the first moment the top was identifiable, which sounds fair, but the backtest engine is giving it the close price, 108, as the fill. The next real trade after the bar closes is somewhere below 108 in a market that has just reversed.
AlphaPrime (Valynox) builds reversal bars from the underlying time bars you choose and confirms each bar at the close of the underlying bar in which the reversal size was reached. The bar's close is the price at which the reversal was established, not the extreme; its high, low and close are then fixed and visible to the strategy, and fills happen at the next real price. Because a minute bar does not say whether its high or its low came first, the engine assumes the order that is worse for a strategy and longer as a path (open, high, low, close on an up minute; open, low, high, close on a down minute), using only that minute's own four prices. A gap between minutes is absorbed into the current bar, and nothing is drawn inside it. One consequence worth knowing: a single minute can never produce more than four reversal bars under these rules, and on ES and NQ 1-minute data it never did, so reversal bars cluster far less than range or Kase bars.
Hypothetical example
Reversal size 4 points. An up bar opens at 100 at 09:33:10 and climbs. At 09:34:22 price prints 112, then falls; at 09:34:50 it trades 108, completing the 4-point reversal. The up bar closes at 108. A backtest fills a short at 108. AlphaPrime confirms the bar at 09:35:00, the close of the 09:34 minute, and fills the short at the first trade of 09:35, around 106 or 107, plus slippage. Two points of the swing were awarded to the chart version for knowing the top before the pullback.
Where does a reversal bar backtest see the future?
At the close, which is the turn; at the high and low, which are the swing points; and in the stop check on a bar whose range is defined by the swing it just completed.
Filling at the turn
Rule: a reversal bar exists only at the close of the underlying bar in which its reversal completed, and the fill is the next real price. Why: the bar's close is the price that completed the pullback, and the next trade is further along the reversal, with the market moving. What it avoids: fills at the exact turning point on every single bar, which is the best entry a swing rule could dream of and one that live trading never delivers.
Treating the extreme as known early
Rule: the bar's high (or low) is visible to the strategy only when the bar is confirmed. Why: before the reversal completes, the extreme can still be replaced by a higher one. What it avoids: rules that place orders relative to a swing high as if the swing high had been visible while the bar was forming.
Stops on swing bars
Rule: stops and targets are judged on the underlying bar's high and low, stop first when one bar covers both. Why: inside a single underlying minute, price can complete a reversal bar, run further, and reverse again; the reversal bar sequence does not tell you the order of those events relative to your stop. What it avoids: a test that enters on one bar and is never stopped on the next because the engine assumed the friendly order.
| Reversal bar feature | Drawn-bar backtest | AlphaPrime |
|---|---|---|
| Bar close (the turn) | Fill at the close | Confirmed at the underlying close; fill at the next real price plus doubled slippage |
| Bar high or low (the swing) | Treated as known while the bar forms | Visible only when the bar is confirmed |
| Several bars inside one minute | Traded one by one | Appear together at the minute close; every signal fills at the same next real price |
| Order of high and low inside a minute | Whichever order the engine prefers | Always the longer, less favourable path |
| Stop check | Reversal bar range | Real highs and lows of the underlying bars, stop first |

How does AlphaPrime backtest a reversal bar strategy?
The strategy reads the alternating bars, their sizes and their extremes. Fills, stops and targets come from the underlying real bars. Rule by rule:
- Each bar is confirmed at the close of the underlying bar in which its reversal completed. Why: until then its high and close are not final. Avoids: acting on an extreme that was later exceeded.
- A market order fills at the next underlying bar's open, with slippage on top. Why: the first price available after the signal exists. Avoids: fills at the turning point.
- Bars that complete inside the same underlying bar appear together. Why: a minute-built engine learns about all of them at the minute close. Avoids: trading a sequence of swings that was visible only in hindsight.
- Stops and targets use the underlying bars' real highs and lows, stop first. Why: the real bar holds the full path; the reversal bars hold only its turning points. Avoids: stop-outs that the swing sequence hides.
- The slippage you set is multiplied by two, with no way to go below that. Why: a reversal bar is established when the market has just turned, and on ES and NQ 1-minute data the distance from a reversal bar's close to the next real trade was the largest of all the range-type charts even for bars that arrived alone. Avoids: pricing a reversal at a quiet-market spread.
What survives this is a swing rule that works with a late entry: one that buys after a down bar has confirmed and holds for more than one bar, rather than one that tries to pick each turn. Picking turns is exactly what the chart makes look easy and exactly what the honest fill takes away. How to weigh the extra cost against the average trade is on the page about commission, slippage and the average trade.
How do you choose bar size and reversal size for a backtest?
Choose a reversal size that is several times your slippage assumption and clearly larger than the typical high-to-low distance of the underlying bar; a tiny reversal size produces a chart that flips on spread noise, every flip costs two fills, and the bars' shape comes mostly from the assumed path inside each minute rather than from the market.
- Reversal size first. It sets how deep a pullback must be to count as a turn. On an intraday index future, a reversal of several ticks above the typical bid-ask bounce is the floor; anything smaller is trading the spread.
- Minimum bar height second, if you use it. It stops a bar from closing before the move has gone anywhere; leave it at zero for the plain chart, or set it to one or two reversal sizes to keep the chart from alternating on noise.
- Underlying resolution. If many reversal bars complete inside one underlying bar, the backtest cannot resolve them; widen the settings or use a finer underlying bar.
Hold the settings fixed across in-sample and out-of-sample. Reversal bars have two interacting parameters with a visible effect on trade count, and that is an invitation to tune on the result. If you want a bar that closes on movement without requiring a reversal, see range bar backtests; if you want the jump from the previous close to count as movement too, see Kase bars.
Which markets and strategies suit reversal bars?
Reversal bars suit swing rules on liquid intraday markets: index futures, major currency pairs and large-cap crypto in active sessions, where pullbacks of the reversal size happen because of real two-way flow rather than spread. They are a poor fit for thin markets, for overnight sessions where the spread approaches the reversal size, and for any rule whose edge is the turn itself.
Before trusting a reversal bar result, delay every entry by one more underlying bar and compare. A rule that holds swings for several bars loses a little. A rule that was picking turns loses almost everything, because its edge was the fill at the close. If the result holds, it has earned walk-forward analysis, the same as any time-bar candidate.
What this means if you use AlphaPrime: choose reversal bars as the chart type in strategy generation, set the reversal size, the optional minimum bar height and the underlying resolution, and run the search. Every candidate is tested with bars confirmed at the underlying close, fills at the next real price with doubled slippage, and stops judged on real bars, whichever of Classic or Reserve you run. The turns in your report are the ones you could have traded after they happened.
Frequently asked questions
What is the difference between reversal bars and range bars?
A range bar closes when its high-to-low distance reaches a set size, in either direction. A reversal bar closes only when price pulls back a set amount from its extreme, and the next bar always runs the opposite way. Range bars measure movement; reversal bars measure swings.
Are momentum bars the same as reversal bars?
They are close relatives. Both continue while price moves one way and flip on a set counter-move; the exact construction of the open and the minimum size differ between implementations. The backtest leaks are the same: the close is the turn, and filling there is filling at the best price the chart can show.
Why is my reversal bar strategy worse in AlphaPrime than on the chart?
Because the chart backtest filled at the bar's close, which is the turning point, and AlphaPrime fills at the next real price after the bar is confirmed. A swing rule that relied on catching each turn loses that edge. One that holds swings for several bars keeps most of its result.
Can I use reversal bars for forex and crypto?
Yes, with reversal size in pips or price units. In crypto the bars cluster around liquidation moves, so test with slippage above the doubled starting point before trusting a result.

