◆ New — Strategy Validator, Code Fixer & Prop Compliance Checker are live. Try one free →
Home / Learn / Why You Shouldn't Backtest on Heikin Ashi, Renko, or Range Charts
TradingView

Why You Shouldn't Backtest on Heikin Ashi, Renko, or Range Charts

Strategy backtests on Heikin Ashi, Renko, range, kagi, and point-and-figure charts are wrong for a structural reason: by default the Strategy Tester fills orders at the chart's synthetic prices — averaged or brick-quantised values that never actually traded — so entries and exits happen at prices no broker could ever have given you. This article walks through the exact math of why, shows the inflated-win-rate failure mode, and gives the correct pattern: compute synthetic-candle signals in Pine on a standard chart so fills use real prices. Educational content only, not financial advice; no chart type or fill setting makes a strategy profitable, and trading carries a real risk of loss.

Why are strategy backtest results wrong on Heikin Ashi or Renko charts?

Because the prices on those charts are synthetic, and by default the Strategy Tester fills your orders at chart prices. A Heikin Ashi candle's open and close are averages of real prices; a Renko brick's close is a quantised level the brick construction chose. Neither is a price at which the market actually traded at that moment — so a backtest filling orders at them is executing trades at prices that never existed. The result is a systematically flattering equity curve, and it is one of the most common sources of the fake 90%-win-rate strategies circulating on TradingView's public library.

This is not a subtle statistical bias like overfitting, where the numbers are real but unrepresentative. It is a bookkeeping error: the trade ledger itself records fictional executions. TradingView's own documentation warns that strategies on non-standard chart types produce unrealistic results, and Pine Script added a dedicated escape hatch — the fill_orders_on_standard_ohlc parameter — specifically because the default behaviour misleads people.

The failure is also asymmetric in the worst way: the distortion almost always helps the backtest. Heikin Ashi averaging makes trend entries look earlier and smoother than real prices allowed; Renko bricks make exits land precisely on clean levels that hindsight constructed. A strategy that merely follows the synthetic candles' colour can look extraordinary on the chart that generated those candles and mediocre-to-poor the moment fills happen at tradeable prices. The sections below work through each chart type's mechanics so you can see exactly where the fiction enters — and then the correct pattern for using these charts' signals without inheriting their fills.

What Heikin Ashi actually plots — and why its prices are untradeable

Heikin Ashi ("average bar" in Japanese) recomputes every candle from real OHLC data using recursive averaging:

  • HA close = (open + high + low + close) / 4 — the average of the real bar's four prices.
  • HA open = (previous HA open + previous HA close) / 2 — the midpoint of the previous synthetic candle, not any real price.
  • HA high / HA low = the maximum / minimum of the real high/low and the synthetic open/close.

Two properties follow immediately. First, the HA open is recursive: it depends on the previous HA candle, which depends on the one before, all the way back. After a few bars, the HA open can sit meaningfully far from anywhere the market traded on that bar. In a strong trend, HA candles open inside the prior candle's body — visually smooth, but at price levels the real market may have gapped past hours earlier.

Second, and fatally for backtesting: when a strategy runs on an HA chart, the broker emulator's default fill prices are these synthetic values. A long entry "at the open" of an HA candle is booked at (prior HA open + prior HA close) / 2 — a computed midpoint, not a quote. In an uptrend that midpoint is systematically below the real market price at that moment, so every entry looks better than achievable and every trend trade's recorded profit is inflated by the gap between synthetic and real prices. Compounded over hundreds of trades, this alone can turn a break-even system into an apparent monster.

The smoothing that makes Heikin Ashi genuinely useful for reading trends is exactly what makes its prices unusable for filling orders. Signals and fills must be separated — which is the pattern in the section after next.

Renko, range, and kagi: bricks that only exist in hindsight

Renko and its relatives (range bars, kagi, point-and-figure) discard time entirely and print a new element only when price moves a fixed amount. A classic Renko chart with a 10-point brick draws a new up-brick when price advances 10 points past the last brick, and requires a reversal — typically two brick-widths against the trend — before printing an opposing brick. That construction has three properties that poison backtests.

Brick prices are quantised, not traded. Bricks open and close exactly on the brick grid — 1.2340, 1.2350, 1.2360 — regardless of the actual sequence of quotes. A strategy filled "at brick close" executes at a lattice point the construction algorithm chose, with the real price at brick-completion time typically already beyond it.

Bricks are confirmed only in hindsight. A reversal brick appears only after price has already travelled the full reversal distance. On the finished chart, the strategy appears to have exited at the brick boundary; in real time, by the moment that brick existed, price was the entire reversal distance past your apparent exit. The chart quietly deletes the adverse excursion that live trading would have eaten.

The realtime chart repaints relative to history. TradingView builds historical Renko bricks from one price source at the chart's base resolution, while realtime bricks form from live updates; after a refresh, the recent brick structure can differ from what a live observer saw. A strategy's historical trade list is therefore drawn on a chart that never appeared in real time in that exact form.

Range bars share the quantisation and hindsight-confirmation problems; kagi and point-and-figure add their own reversal-lag distortions. The common thread: on all of these charts, the x-axis positions and prices of chart elements are artefacts of construction rules, and the Strategy Tester fills orders into that artefact.

The correct pattern: signals from synthetic candles, fills at real prices

If Heikin Ashi's smoothing genuinely helps your logic, the fix is to keep the signal and drop the fill: run the strategy on a standard candlestick chart and compute the HA values yourself in Pine. The formulas are four lines, and every order then fills at real chart prices under the normal broker-emulator rules.

//@version=6
// Educational only — validate before trading; not financial advice.
// Heikin Ashi SIGNALS computed on a standard chart — fills use real prices.
strategy("HA signal, real fills", overlay = true)

haClose = (open + high + low + close) / 4
var float haOpen = na
haOpen := na(haOpen[1]) ? (open + close) / 2 : (haOpen[1] + haClose[1]) / 2

haBull = haClose > haOpen
haBear = haClose < haOpen

longSig = haBull and not haBull[1]
exitSig = haBear and not haBear[1]

if longSig and barstate.isconfirmed and strategy.position_size == 0
    strategy.entry("Long", strategy.long)
if exitSig and barstate.isconfirmed and strategy.position_size > 0
    strategy.close("Long")

The recursion is seeded on the first bar with (open + close) / 2 and thereafter uses the previous synthetic candle, exactly matching what the HA chart type displays — but strategy.entry() now executes at the next real bar's open, a price that actually printed.

TradingView also offers a half-measure for scripts already living on HA charts: strategy(..., fill_orders_on_standard_ohlc = true) (or the "Fill orders using standard OHLC" checkbox in the strategy's Properties). This keeps the HA chart but fills orders using the underlying real candles' prices. It is strictly better than the default and worth switching on immediately when auditing someone else's HA strategy — but the explicit-computation pattern above is cleaner, because your signal logic, your fills, and your chart all become inspectable in one place. For Renko-style logic, the equivalent is computing brick state from real prices in script; there is no fill setting that repairs a Renko chart's hindsight construction.

How to audit a suspicious backtest — and the honest limits

When you encounter a strategy with a spectacular win rate — your own or a published one — the chart type is the first thing to check, before any statistical analysis. The audit takes minutes.

Check the chart. If the strategy sits on Heikin Ashi, Renko, range, kagi, or point-and-figure, treat every performance number as unverified. Flip the fill setting. On an HA chart, enable "Fill orders using standard OHLC" in Properties and watch the metrics. A robust strategy degrades modestly; a synthetic-fill artefact collapses — win rates falling from 90% to below 50% on this single toggle are common, because the entire edge was the gap between averaged and real prices. Re-run on candles. Port the logic to a standard chart (computing HA/brick state in script as above) and compare the trade lists trade-by-trade. Entries that shift several ticks against you on every trade tell you exactly how much of the profit was fictional. Then, and only then, apply the usual honesty checks — sample size, out-of-sample behaviour, parameter sensitivity — to whatever survives.

Two honest caveats close this out. First, passing the audit does not make a strategy good: a strategy correctly filled at real prices can still be overfit, undersampled, or simply mediocre. Chart-type hygiene removes one specific fiction; it manufactures no edge. Second, even a clean standard-chart backtest inherits the broker emulator's own assumptions — idealised fills, assumed intrabar paths, no slippage or spread unless you configure them. Heikin Ashi and Renko strategies fail louder than most, but every backtest is a simulation, not a record.

None of this is financial advice. Synthetic-price charts are legitimate visualisation tools; they are simply the wrong place to execute simulated orders. Validate the mechanics, distrust the highlight reel, and remember that trading carries a real risk of loss regardless of what any chart type reports.

Key takeaways

Educational only — not financial advice. Trading involves substantial risk of loss.

Catch the bug that compiles.Run auditGet Pro