← All scripts

Optimized Heikin Ashi Strategy with Buy/Sell Options

by markontie · Strategy · Pine Script v5 · 1,016 likes

Lookahead

Optimized Heikin Ashi Strategy with Buy/Sell Options by markontie, a Pine Script v5 strategy, converted with PyneComp and run with PyneCore on BINANCE:BTCUSDT 4h: run with TradingView's future-leaks restored, its own plots change, so its results depend on data its bars could not have had and it is held apart from the accuracy score (lookahead).

Plot match vs TradingView77.9%

Lookahead, measured — run once with PyneCore's own rules and once with TradingView's future-leaks restored (an open higher-timeframe period read as if it had closed, or a body re-running mid-bar handed the completed bar), the script's own plots differ. Its results depend on data its bars could not have had, so its TradingView reference is itself a lookahead result. With the future-leaks restored on the PyneCore side too, its plots match TradingView 100%. Held apart from the accuracy score.

Accuracy

  • Trades compared73 TV / 164 Pyne
  • Whole-trade match9.15%
  • Entry timing match49.32%
  • Exit timing match58.9%
  • Extra Pyne entries128
  • Net profit (TV / Pyne)7 / 1
  • Plots compared8
  • Plotted values compared158,934
  • Identical to the bit77.873%
  • Worst gap7.1 × 10⁻¹ relative (~0 significant figures)
  • Pearson correlation (min)0.364643
  • Worst-matching plotCandles (close)

Run

  • Bars executed19,868
  • Secondary-feed bars3,315
  • Total bars processed23,183
  • Run time3.51 s CPU
  • Per-bar time0.18 ms/bar CPU (per chart bar)

Data window

  • SymbolBINANCE:BTCUSDT
  • Timeframe240 min
  • From2017-08-17 04:00
  • To2026-09-13 04:00
  • Bars19,868
  • Security @ 1D3,315 bars

Source

  • Pine versionv5, converted to v6 by PyneComp
  • Script revisionv2
  • Licenseunspecified

SHA-25631d29f15bf295c3f86903473d0e8080d09f6f359735aa10eceafde1141186b30

View on TradingView Permalink: Optimized Heikin Ashi Strategy with Buy/Sell Options

Measured 2026-09-27 · How this is measured · All scripts