Why Renko and Heikin Ashi backtests cheat, and how AlphaPrime stops it
Most synthetic-bar backtests cheat in three places: the bar is drawn with a close it could not know, the fill uses the bar's own price, and the stop is judged on the drawn bar instead of the real one. AlphaPrime closes each synthetic bar only after its underlying bar closes, fills every order at the next real price plus slippage, and checks stops on the underlying high and low, stop first.
By Soren Huang · Published · updated · Editorial policy
Contents
- Why do Renko and Heikin Ashi backtests look so much better than live trading?
- Where does the future leak into a synthetic-bar backtest?
- Leak 1: the bar is finished before its data is
- Leak 2: the fill uses the bar's own price
- Leak 3: the stop is judged on the drawn bar
- Rule 1: a synthetic bar exists only after its underlying bar has closed
- Rule 2: signals come from the synthetic bar, fills come from the next real price
- Rule 3: stops and targets are judged on the underlying bar, stop first
- Why do fast markets need double slippage on multi-brick charts?
- Which chart types does this cover, and where is each one explained?
- Frequently asked questions
Why do Renko and Heikin Ashi backtests look so much better than live trading?
Because the chart is drawn with prices the trader could not have seen at the time. A Renko brick, a Heikin Ashi candle or a range bar is a synthetic bar: a shape built from real trades by a rule. Most backtests let the strategy trade the shape, and the shape quietly knows the future.
A synthetic bar is any bar that is not a plain slice of clock time. Renko bricks, FlexRenko, Kagi lines, Line Break blocks, range bars, reversal bars, Kase bars and point and figure columns all belong to this family, and so does Heikin Ashi, which keeps the time axis but replaces the prices. Traders like them because they filter noise. Backtest engines like them for a worse reason: they make almost any trend rule look good.
The problem is not the chart. The problem is three small decisions a backtest makes about each bar, and all three are usually made the lazy way. This article is the overview; each chart type has its own page with the details for that shape. The three rules below are the ones AlphaPrime (Valynox) applies to every synthetic-bar strategy it builds or tests, in Classic and in Reserve alike.
Where does the future leak into a synthetic-bar backtest?
In three places, and they stack. Each one on its own adds a little edge that does not exist. Together they can turn a losing idea into a straight-line equity curve.
Leak 1: the bar is finished before its data is
A Renko brick "closes" when price has moved one brick size. On a chart replaying history, the engine knows the brick will complete, so it draws it and lets the strategy act on it. In real time, you only know the brick completed once the underlying trade that crossed the threshold has printed, and most engines only learn that at the close of the underlying minute bar they are built from. If the backtest acts at the brick's nominal close price, it is acting on a trade that may be seconds or minutes away from being confirmed.
Leak 2: the fill uses the bar's own price
This is the big one. A brick that closes at a round number did not trade at that number for you. By the time the brick is confirmed, the market is somewhere else, often several ticks further in the direction of the move, because that is what completing a brick means. Filling a long entry at the brick close gives you a price that the move itself has already left behind. Heikin Ashi is worse: its open and close are averages, so a fill at the Heikin Ashi close is a fill at a price that may never have traded at all.
Leak 3: the stop is judged on the drawn bar
A Renko brick has no wick in most implementations. A Heikin Ashi candle has a smoothed high and low. If the engine checks your stop loss against the synthetic bar's range, the stop is hit less often than it would have been against the real trades inside that bar. Your maximum adverse excursion looks small, your stop looks tight and safe, and neither is true.
| Leak | What the lazy backtest does | What a live trader actually sees |
|---|---|---|
| Bar completion | Treats the brick as known the moment price touches the threshold | Learns the brick completed only after the underlying bar closes |
| Fill price | Fills at the brick close or the Heikin Ashi close | Gets the next real trade, usually worse, plus slippage |
| Stop check | Compares the stop with the synthetic high and low | Gets stopped on real ticks the synthetic bar hid |

Rule 1: a synthetic bar exists only after its underlying bar has closed
AlphaPrime builds every synthetic bar from a stream of real, time-based bars (the underlying resolution, typically 1-minute), and a synthetic bar becomes visible to the strategy only at the close of the underlying bar that completed it. Not at the tick that crossed the line, and never at the nominal brick price.
This has three consequences you will notice. First, a fast move that completes three bricks inside one minute produces three bricks that all become visible at the same moment, at the end of that minute. The strategy cannot trade the first brick and then the second; every signal from those three bricks fills at the same next real price. Second, the bar's timestamp is the close time of the underlying bar, so when you export the strategy to a live platform, the order timing matches what the platform can actually do. Third, a chart element that can keep growing is cut into steps that cannot be undrawn: a point and figure column hands the strategy a bar each time it adds a box, and a Kagi line each time a reversal is confirmed, the line changes thickness, or it extends by another reversal amount. Whatever the strategy has seen stays on the chart exactly as it saw it, and a reversal is still known only after the full reversal amount has been covered, which the chart version hides by drawing the turn at the extreme.
The same rule applies to Heikin Ashi, which is time-based but computed: each Heikin Ashi candle is calculated from the completed real candle, and its values are frozen there. There is no repainting of the current candle, because the strategy never sees a candle that is still forming.
Hypothetical example
Brick size 10 points. At 09:31:12 price crosses 5,010 and a chart would draw a new up brick. At 09:31:40 price is 5,014. The underlying minute closes at 09:32:00 at 5,012. In AlphaPrime the brick is confirmed at 09:32:00, and a buy signal on it is filled at the first trade of the 09:32 minute, around 5,012 plus slippage, not at 5,010.
Rule 2: signals come from the synthetic bar, fills come from the next real price
Your rule reads Renko bricks, Heikin Ashi colours or point and figure columns. That part is fine and it is the whole point of these charts. The fill is a different matter: every order is filled at the next real price after the signal is known, plus the slippage you set. The brick close, the Heikin Ashi close and the box price are never used as a fill.
In practice this means a market order placed on a confirmed brick fills at the open of the next underlying bar. A stop or limit order waits inside the underlying bars until a real trade reaches its price. This is the same next-bar rule AlphaPrime uses for ordinary time bars, applied at the resolution of the real data rather than the resolution of the drawing. If you have read the page on look-ahead bias and the one-bar shift test, this is that rule carried over to charts where "the next bar" is ambiguous.
The cost of honesty is visible immediately. A trend rule on 10-point Renko bricks that averaged 6 points per trade with brick-close fills might average 2 points with next-real-price fills. That drop is not the engine being harsh. It is the amount of edge that was never there.
Rule 3: stops and targets are judged on the underlying bar, stop first
Stop losses, profit targets and trailing stops are checked against the real highs and lows of the underlying bars beneath each synthetic bar, not against the synthetic bar's drawn range. If one real-price bar covers both your stop and your target, AlphaPrime assumes the stop was hit first. It does not look inside the bar for a friendlier order of events, because the bar does not tell you that order.
This rule costs you some winners in the backtest. It also removes the most common reason synthetic-bar strategies fall apart live: a stop that the chart said was never touched, and the broker said was. If you want the detail on how stops are placed and sized, the page on stop losses in systematic strategies covers it; the rule there and the rule here are the same rule.
Trailing stops follow the same logic. The trail is updated from the underlying bar's high or low, and it only starts tracking after the entry bar has closed. A trail that starts on the entry bar, using that bar's own extreme, is another small gift from the future.
Why do fast markets need double slippage on multi-brick charts?
Because the bars that produce signals are, by construction, the bars where the market is moving fastest. A range bar or a Renko brick completes quickly exactly when volatility spikes, which is when the spread widens and the book thins. Your fill is worse on those bars than your average slippage setting assumes.
AlphaPrime's rule for Renko, FlexRenko, range bar, reversal bar, Kase bar and point and figure strategies is to multiply the slippage you set by two, and to keep the fixed commission unchanged. You can raise the multiplier; you cannot lower it below two. These are the chart types where several bars can complete inside one underlying minute, and the engine's own measurement on about three years of ES and NQ 1-minute data shows why: in minutes that produced three or more range bars, the distance from a bar's close to the next real trade was roughly four times what it was in minutes that produced one. Kagi and Line Break are built from closes, at most one line per underlying bar, so they do not cluster; they still carry the minimum multiplier of two, because a line is confirmed after a sizeable move, when the market is running, and their larger hidden cost, the distance from the drawn line to the real fill, is charged by the real-price fill on top. Heikin Ashi is the one exception: it trades at ordinary time-bar frequency and keeps your normal slippage. The general method for putting costs into a test is on the page about commission, slippage and the average trade.
| Chart family | When bars complete | Slippage multiplier |
|---|---|---|
| Renko, FlexRenko, range, reversal, Kase, point and figure | Several can complete in one underlying bar, clustered in fast markets | Two or more; cannot be set below two |
| Kagi, Line Break | At most one line per underlying bar, confirmed after a sizeable move | Two or more; the real-price fill charges the line-to-fill distance on top |
| Heikin Ashi | Every time bar | One; real-price fills |

Which chart types does this cover, and where is each one explained?
Every synthetic bar type AlphaPrime can build a strategy on has its own page, with the drawing rule, the specific place its backtests usually cheat, and what kind of market it suits. Read the one you trade.
- Heikin Ashi backtests: why the smoothed close is never a fill price, and how the colour-change rule is timed.
- Renko chart backtests: brick size, the missing wick, and the phantom bricks a gap creates.
- FlexRenko bars: what the trend and reversal offsets change, and why the reversal brick is where the leak hides.
- Kagi charts: reversal amount, yang and yin lines, and why a turn is known at the bottom of the new line, not at the shoulder.
- Line Break charts: three-line reversal and the long wait it imposes on exits.
- Range bar backtests: fixed range, variable time, and why the last tick of a range bar is the worst price to assume.
- Reversal bars: alternating up and down bars and the trap of filling at the turn.
- Kase bars: true-range bars that count the jump from the previous close, and why they never need a phantom bar.
- Point and figure backtests: box size, reversal boxes, and why the breakout box is a level the market passed, not an entry.
The underlying rules do not change between them. What changes is where the lazy shortcut usually sits, and how much it flatters the result.
What this means if you use AlphaPrime: pick a chart type in strategy generation and the three rules are applied to every candidate the search tests, in Classic and in Reserve. You cannot switch them off, and that is deliberate. When you export a strategy built this way, the exported file carries a note naming the chart type and settings it was built on and stating that fills were taken at the first real price after each signal, so you can set the live chart to match and know what to expect. Your job is to set an underlying resolution fine enough for the chart type (1-minute is the usual choice for intraday bricks), leave the slippage multiplier at two or raise it, and then judge the strategy on the out-of-sample result the way you would judge any other. If the result still holds, you have something. If it only held with brick-price fills, you have a drawing.
Frequently asked questions
Do Renko charts repaint?
The completed bricks do not change, but the forming brick is redrawn until it completes, and on some platforms the open of the last brick moves with direction. A backtest that lets a strategy act on the forming brick is using information that was not final. AlphaPrime shows the strategy a brick only after the underlying bar that completed it has closed, so the strategy never sees a brick that can still change.
Does Heikin Ashi repaint?
A finished Heikin Ashi candle does not repaint, but the current candle changes with every tick, and its open and close are averages rather than traded prices. The leak in most Heikin Ashi backtests is not repainting; it is filling at the Heikin Ashi close. AlphaPrime takes the signal from the completed candle and fills at the next real price.
Is this the same as look-ahead bias?
Yes, it is look-ahead bias in a particular costume. The general error is any backtest using a number that did not exist yet when the order was sent. Synthetic bars make it easy to commit without noticing, because the drawn bar looks like a normal bar and the engine fills at it as if it were one.
Can I still use brick-based rules for entries?
Yes. The rules read the synthetic bars; only the fill and the stop check use real prices. A Renko breakout rule or a Heikin Ashi colour-change rule stays exactly as you wrote it. What changes is the price you get and how often your stop is hit, which is what a backtest is supposed to tell you.
Does this apply to forex and crypto as well as futures?
The rules do not depend on the market. Any instrument with a real-price history at an underlying resolution can have synthetic bars built on it, and the same three leaks appear in forex and crypto backtests. The slippage numbers differ by market; the method does not.

