← All scripts

Three moving average strategies

by dadashkadir · Strategy · Pine Script v4 · 775 likes

Lookaheadbit-exact

Three moving average strategies by dadashkadir, a Pine Script v4 strategy, converted with PyneComp and run with PyneCore on BINANCE:BTCUSDT 30m: run with TradingView's future-leaks restored, its own trades 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 TradingView100%

Lookahead, measured. The script was 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 that is handed the completed bar). Its trades differ between the two runs, so its results depend on data its bars could not have had, and its TradingView reference is a lookahead result too. With the future leaks restored on the PyneCore side as well, its trades match TradingView 100%. Kept out of the accuracy score.

Accuracy

  • Trades compared1,548 TV / 1,548 Pyne
  • Whole-trade match95.8%
  • Entry timing match97.74%
  • Exit timing match97.74%
  • Extra Pyne entries35
  • Net profit (TV / Pyne)-5,557 / -6,500
  • Plots compared7
  • Plotted values compared214,429
  • Identical to the bit100%
  • Worst gapsame double
  • Pearson correlation (min)1.000000

Run

  • Bars executed30,651
  • Run time1.55 s CPU
  • Per-bar time0.05 ms/bar CPU (per chart bar)

Data window

  • SymbolBINANCE:BTCUSDT
  • Timeframe30 min
  • From2025-01-01 00:00
  • To2026-10-01 13:00
  • Bars30,651

Source

  • Pine versionv4, converted to v6 by PyneComp
  • Script revisionv1
  • LicenseMPL-2.0

SHA-256fa1a64bc334c306da9b456df443a5fa556031616a071a006650efe55992a9453

View on TradingView Permalink: Three moving average strategies

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