BEST Trailing Stop Strategy
BEST Trailing Stop Strategy by Daveatt, 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).
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 compared814 TV / 814 Pyne
- Whole-trade match97.18%
- Entry timing match98.53%
- Exit timing match98.53%
- Extra Pyne entries12
- Net profit (TV / Pyne)-5,777,327 / -6,638,281
- Plots compared7
- Plotted values compared147,768
- Identical to the bit99.957%
- Worst gap1.4 × 10⁻³ relative (~2 significant figures)
- Pearson correlation (min)1.000000
- Worst-matching plotSLPriceTrigger
Run
- Bars executed29,651
- Run time2.09 s CPU
- Per-bar time0.07 ms/bar CPU (per chart bar)
Data window
- SymbolBINANCE:BTCUSDT
- Timeframe30 min
- From2025-01-01 00:00
- To2026-09-10 17:00
- Bars29,651
Source
- Pine versionv4, converted to v6 by PyneComp
- Script revisionv1
- Licenseunspecified
SHA-2567dc080c7d13c4c9eae216953eea19399665024a2c57f73515ca9b4cc75c9d9d2
Measured 2026-09-27 · How this is measured · All scripts