Heikin Ashi & Renko Backtesting|Synthetic Risk | SG Group
Skip to the article
TradingView guide · Content reviewed 日本語で読む
SYNTHETIC PRICE AUDIT · TV13

Can You Backtest Heikin Ashi and Renko Charts? Synthetic-Price Risks Explained

Heikin Ashi, Renko, Kagi, Line Break, Point & Figure and Range charts transform market movement under their own construction rules. Their displayed bar prices are not necessarily prices that could have been traded in the market. If synthetic OHLC also drives order fills, a strategy can appear to enter or exit at levels that did not exist as executable prices. This guide does not rank chart styles; it separates the data used for a signal from the standard market data used to audit a fill.

Who this guide is for: Traders whose non-standard-chart Tester result looks unusually strong and Pine users who want synthetic signals without silently accepting synthetic fills

Key points to understand first

ONE SIGNAL, TWO PRICE ROLES

Separate the bar you analyze from the price that can fill

Standard market barsAudit as the fill basis
  • O 100.0
  • H 103.0
  • L 98.0
  • C 101.0
Synthetic chart barsRestrict to signal analysis
  • O 99.5
  • H 102.2
  • L 99.0
  • C 101.6
  1. SignalWhich series calculated the condition?
  2. OrderWhen and which order type was created?
  3. FillDid execution use standard or synthetic prices?
All values are fictional. The gap illustrates different series definitions, not an arbitrage opportunity.
DIRECT ANSWER

Use non-standard charts for analysis, but do not trust synthetic fills by default

A strategy on Heikin Ashi, Renko or another non-standard chart can fill orders at synthetic chart levels and produce results that cannot be reproduced in a real market. Smoother trends and fewer visible stops do not prove that the same outcome exists at standard market prices.

Write down two separate fields: the series that calculates the signal and the market series used to assess execution. Even when a synthetic series remains part of the hypothesis, verify the normal-candle symbol ID, session, timeframe, standard OHLC and order timing. Begin the comparison with paired trade IDs and entry/exit prices—not net profit.

01 · SYNTHETIC/STANDARD RESULT

Disclose the synthetic-versus-standard comparison first

Synthetic versus standard pair audit
EvidenceSynthetic versionStandard baselineDecision
Chart / seriesChart type and signal sourceTicker ID, session and timeframeCan the input basis be identified?
EntryTrade ID, bar and priceMatching ID, bar and priceDid the trade start at a non-market level?
ExitStop/target, bar and priceSame order rule on standard dataDid only synthetic high/low create the exit?
SampleTrade count and missing IDsAdded or removed IDsWas the preferred chart selected after results?

If no standard execution baseline can be built, keep the hypothesis in the visual-analysis scope.

Start with trades absent from the standard version, large entry/exit gaps and same-bar trades. If the appealing result disappears under standard fills, preserve that failure as evidence instead of selecting the chart type after seeing the outcome.

Report total trades, paired trades, synthetic-only trades, standard-only trades, median price gap and maximum gap together. Do not build the conclusion from one showcase trade or remove unmatched trades from the denominator. Classify each difference as signal timing, order creation, fill basis, session, missing data or unresolved.

02 · DECISION TREE

Identify the construction and decide whether a standard-price baseline is possible

Heikin Ashi averages combinations of current and previous standard OHLC into synthetic values. Renko, Line Break, Kagi and Point & Figure construct units from price movement rather than ordinary fixed-time boundaries; Range charts use a movement threshold as well. Do not group them under a vague “noise reduction” label—identify whether price, time or both have been transformed.

Chart-family audit
ChartMain constructionBacktest riskSafer role
Standard candles/barsTime-based market OHLCGranularity, gaps and fill assumptionsExecution baseline
Heikin AshiAveraged synthetic OHLCSynthetic fillsSeparate signal and fill
Renko / RangeMovement-defined bricks/barsApproximate price path and timeRebuild on standard chart
Kagi / Line Break / P&FReversal or break rulesNon-executable transformed levelsVisual analysis only

Verify current construction and feature behavior in TradingView’s official documentation.

Historical Renko and similar structures can also contain a cleaner finalized sequence than was available in real time. This article does not repeat TV04’s general repainting taxonomy; it audits series construction and the price used for fills.

  1. Check the time-bar mapping

    If each synthetic bar maps to the same standard time boundary, test whether signal and fill can be separated.

  2. Verify the standard-price option scope

    Do not generalize a Heikin-Ashi-specific property to Renko or other families.

  3. Rebuild the rule on a standard chart

    Request the brick or reversal state as an analytical input and create orders on standard bars.

  4. Restrict the claim when mapping fails

    Keep a display without defensible price and time evidence in visual analysis or hypothesis generation.

Record this branch before viewing performance. If the need for a standard baseline changes after synthetic profits are known, chart type becomes an optimized parameter. Preserve decision date, family, construction value, mapping method and any reason the mapping cannot be completed.

03 · HEIKIN ASHI CASE

Audit Heikin Ashi signal timing against standard-OHLC fills

Because each Heikin Ashi time bar corresponds to a standard time bar, TradingView provides a way for a strategy on a Heikin Ashi chart to fill orders from standard OHLC. Pine exposes `fill_orders_on_standard_ohlc`; the interface can expose a corresponding property. Confirm current naming and availability.

That option does not validate the strategy. It creates a two-series design: a synthetic signal and a standard-price fill. Preserve when the signal became confirmed, when the order was created and which standard price filled it. A Heikin Ashi color change is not automatically an event at the standard close.

Separate synthetic signal from standard executionSignal state = function(synthetic OHLC, confirmed time)Fill evidence = standard OHLC + order type + Broker Emulator ruleSynthetic gap = |synthetic reference − standard reference|The gap audits input definitions; it is not tradable arbitrage or predicted P&L.
Heikin Ashi price-basis ledger
EvidenceValue to recordFailure boundary
Signal sourceHA ticker, timeframe, session and confirmed barUsing an open synthetic value as confirmed
Execution sourceStandard ticker ID, OHLC and fill propertySilently reverting to synthetic OHLC
Order lifecycleCondition, creation and fill bar/timeEquating a color change with order creation
Paired tradeRule ID, entry/exit gap and missing tradeReading profit before price-basis differences

A shared signal does not make the result version identical when the fill basis differs.

04 · RENKO FAMILY CASE

Falsify brick completion time and standard-bar mapping for Renko families

Do not generalize `fill_orders_on_standard_ohlc` to Renko, Kagi, Line Break or Point & Figure. TradingView’s declaration reference describes it for Heikin Ashi and notes that other non-standard chart strategies remain tied to their synthetic prices. One toggle does not make a Renko-chart backtest realistic.

Use a standard chart as the execution context. If needed, request `ticker.renko()` or another transformed series explicitly as an analytical input, define when its state becomes eligible, and create the order on standard bars. Lower-timeframe construction remains an approximation, so preserve variants across brick sizes rather than selecting the best historical one.

A concrete failure case is a finalized brick sequence showing one clean reversal while standard bars crossed the same levels several times. If a small brick-size change moves the condition bar, trade count and entry time materially, treat construction dependence as the primary finding. Compare fixed brick-size versions over the same window and retain every trade that cannot be mapped to standard bars as unverified.

05 · PINE V6 REPRODUCTION

Request the synthetic series and reproduce three price-basis versions

The Pine v6 sample requests a Heikin Ashi close as an analytical series and evaluates a fictional cross on a confirmed chart bar. `fill_orders_on_standard_ohlc = true` records the standard-fill intent when the strategy is placed on a Heikin Ashi chart; on a standard chart, execution already uses standard chart prices. The length of 20 is instructional, not a recommendation.

Pine Script v6: synthetic-signal / standard-fill auditpine
//@version=6
strategy(
    "Heikin-Ashi signal audit demo",
    overlay = true,
    fill_orders_on_standard_ohlc = true
)

string haTicker = ticker.heikinashi(syminfo.tickerid)
float haClose = request.security(
    haTicker,
    timeframe.period,
    close,
    gaps = barmerge.gaps_on,
    lookahead = barmerge.lookahead_off
)
float haBasis = ta.sma(haClose, 20)
bool longCondition = ta.crossover(haClose, haBasis) and barstate.isconfirmed
bool exitCondition = ta.crossunder(haClose, haBasis) and barstate.isconfirmed

if longCondition
    strategy.entry("L", strategy.long)
if exitCondition
    strategy.close("L")

plot(haClose, "HA close", color.teal)
plot(haBasis, "HA basis", color.orange)

Preserve request behavior, session, gaps and chart type; do not extend the same conclusion to Renko or Kagi.

A request introduces another data context. Even at the same timeframe, inspect sessions and gaps; for a higher timeframe use TV14’s confirmation pattern. Compilation, an attractive marker and robust standard-price fills are three separate checks.

Run three versions: standard signal with standard fill, synthetic signal with standard fill, and a diagnostic synthetic-signal/synthetic-fill version. Freeze period, symbol, order rule, costs and sizing, then assign separate version IDs. Pair trades under one rule ID and retain the first point where pairing fails. The third version is evidence of synthetic-price dependence, not a performance candidate.

06 · VALID RESULT PATH

Analyze only after the standard price basis is defensible

Send only an export whose signal timing and standard-fill mapping can be explained to the Backtest & Robustness Lab. Treat the synthetic-price and standard-price runs as a pair, then inspect their KPI, drawdown, trade-distribution and OOS differences to locate conclusions that depend on the price basis. Paid version management is most relevant when that paired evidence must be saved and revisited.

Free indicators can be observed on transformed charts, but an indicator is not a Strategy Tester strategy export. Review source, inputs, chart type and confirmation behavior; treat any conversion to a strategy as a new specification.

SYNTHETIC PRICE GAP

Convert a synthetic-versus-standard gap into ticks and scaled impact

Enter a standard fill reference, synthetic reference, quantity and tick size for one fictional event. The output measures a series-definition difference.

Absolute gapprice
Gap in ticksticks
Quantity-scaled gapprice×units

Absolute gap = |B-A|; ticks = gap/D; scaled gap = gap×C. It excludes contract multiplier, currency, costs and slippage and is neither an opportunity nor actual P&L.

Frequently asked questions

Is using a strategy on Heikin Ashi prohibited?

That is too simple. Default synthetic fills may not represent the market, so document the signal series and use or audit standard-OHLC fills.

Does fill_orders_on_standard_ohlc fix Renko too?

No. The official reference describes the feature for Heikin Ashi. Rebuild Renko and Kagi hypotheses in a standard-chart execution context.

Does Bar Magnifier make a Renko backtest realistic?

No guarantee follows. Lower-timeframe intrabar detail and Renko’s synthetic price/time construction are separate issues.

Can a synthetic signal run on a standard candlestick chart?

Yes, Pine can explicitly request a synthetic ticker while the standard chart remains the execution context. Audit signal confirmation, session, gaps and order creation timing separately.

Must the synthetic-price and standard-price runs contain the same number of trades?

No. A different price basis can change signals or fill conditions and therefore split the trade populations. Preserve the first divergent rule ID, timestamp, signal price and standard OHLC instead of forcing the counts to match.

Primary sources and verification links

  1. TradingView Pine Script | Non-standard charts dataOfficial Heikin Ashi, Renko, Kagi and other transformed data guidance
  2. TradingView | Unrealistic results on non-standard chartsOfficial explanation of why synthetic-chart strategy fills can mislead
  3. TradingView Pine Script | Declaration statementsOfficial fill_orders_on_standard_ohlc scope
  4. TradingView Pine Script FAQ | StrategiesOfficial FAQ for backtesting on non-standard charts
  5. TradingView Pine Script | Other timeframes and dataOfficial data-context and gap behavior for requested ticker IDs

Edited and published by: SG Group · Editorial approach: We prioritize official TradingView Help Center and Pine Script documentation, then use exchange, regulator and other primary materials for market and product context. Features, data, pricing and connection terms change, so verify the current interface and linked sources before use.

Important notice: This article provides general education about TradingView interfaces, charts, alerts, screeners, paper trading and Pine Script. It is not investment advice, a trading signal, a recommendation of any instrument, data source or broker, or a guarantee of future price or profit. Features, pricing, data, exchange coverage, notifications, order integrations and Pine Script behavior vary by plan, region, connection and date and may change. Before risking money, verify current TradingView documentation and the terms of the relevant data source and connected provider, then rehearse the workflow with fictional data or paper trading.