← All scripts

SUPERTREND ATR WITH TRAILING STOP LOSS

by exit490 · Strategy · Pine Script v4 · 4,900 likes

Lookahead

SUPERTREND ATR WITH TRAILING STOP LOSS by exit490, 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 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 TradingView99.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 compared621 TV / 621 Pyne
  • Whole-trade match99.68%
  • Entry timing match99.84%
  • Exit timing match99.84%
  • Extra Pyne entries1
  • Net profit (TV / Pyne)-275 / -286
  • Plots compared5
  • Plotted values compared56,574
  • Identical to the bit100%
  • Worst gapsame double
  • Bars plotted by one side only22
  • Match on values alone100%
  • Pearson correlation (min)1.000000
  • Worst-matching plotEntry Price

Run

  • Bars executed28,269
  • Run time2.86 s CPU
  • Per-bar time0.10 ms/bar CPU (per chart bar)

Data window

  • SymbolBINANCE:BTCUSDT
  • Timeframe30 min
  • From2025-01-01 00:00
  • To2026-08-12 22:00
  • Bars28,269

Source

  • Pine versionv4, converted to v6 by PyneComp
  • Script revisionv1
  • LicenseMIT

SHA-25613536f2dfd3c5b3b1c81195596ec13cd53b2e551303011b14540f965fb2db868

View on TradingView Permalink: SUPERTREND ATR WITH TRAILING STOP LOSS

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