How 26 Pine Script v5 Rules Behave Across 8 Distinct Markets
Which rule families adapt best when moving from 24/7 Bitcoin spot to equity indices, precious metals or crude oil? Every rule below is replayed with sa-pine-vm (0.10% fee per order, latest 20% of candles kept unseen; differences with the Strategy Tester are possible) alongside the verdict of the judge engine computed on each asset.
In short (computed on 29 November 2026, sa-pine-vm 0.2.1): across 208 tests (26 classic Pine Script v5 rules × 8 daily markets, 0.10% fees per order, latest 20% sealed), 173 are judgeable (at least 10 trades) and none reaches “Survives” (4 of 4 steps). On Bitcoin, where holding lost 23.25% over the sealed period (17 Dec 2024 to 16 Oct 2026), 14 of the 15 judgeable rules did better than holding and 4 passed 3 of 4 steps; CCI 20 (+100) Breakout leads at +9.09% (17 sealed trades).
Protocol & cross-market scope
Computed on 2026-11-29 with sa-pine-vm 0.2.1 (Strategy Arena Pine v5 engine; differences with the Strategy Tester are possible). Past data research only, never investment advice.
Best-holding rule on each market (sealed 20% period, paired with the judge engine's verdict)
During strong multi-year bull runs on Gold (+129.04%), S&P 500 (+139.76%) or Silver (+229.31%), long-flat rules that sit in cash between signals naturally lag Buy & Hold while reducing market exposure; during Bitcoin's −23.25% sealed window (2024-12-17 → 2026-10-16), trend and momentum filters cushioned drawdowns, though none cleared all 4 statistical steps simultaneously.
| Market | History & cut date | Sealed Buy & Hold | Top judgeable rule | Sealed return (vs holding) | Judge engine verdict (per asset) |
|---|---|---|---|---|---|
| Bitcoin Spot Crypto |
3,348 sessions (2017-08-17 → 2026-10-16) Sealed cut: 2024-12-17 |
-23.25% | CCI 20 (+100) Breakout Momentum & Volume |
+9.09% (+32.34 pts) 17 sealed trades |
No proof yet (3/4 steps) Online judge (BTCUSDT) |
| Gold (GLD) Precious Metals |
5,497 sessions (2004-11-18 → 2026-09-25) Sealed cut: 2022-05-10 |
+129.04% | Pivot High/Low Breakout Volatility Breakout |
+107.67% (-21.37 pts) 10 sealed trades |
No proof yet (1/4 steps) Judge engine, computed on Gold (GLD) |
| S&P 500 US Equities |
8,472 sessions (1993-01-29 → 2026-09-25) Sealed cut: 2019-12-30 |
+139.76% | EMA Crossover 9/21 Trend Following |
+98.49% (-41.27 pts) 27 sealed trades |
No proof yet (1/4 steps) Judge engine, computed on S&P 500 (SPY) |
| Nasdaq 100 US Tech Equities |
6,930 sessions (1999-03-10 → 2026-09-25) Sealed cut: 2021-03-22 |
+133.20% | ALMA 20 Gaussian Trend Trend Following |
+68.83% (-64.37 pts) 18 sealed trades |
No proof yet (2/4 steps) Judge engine, computed on Nasdaq 100 (QQQ) |
| DAX 40 German Equities |
9,797 sessions (1987-12-30 → 2026-09-25) Sealed cut: 2019-01-14 |
+133.59% | Bollinger Band Bounce Mean Reversion |
+115.32% (-18.27 pts) 24 sealed trades |
No proof yet (1/4 steps) Judge engine, computed on DAX 40 |
| CAC 40 French Equities |
9,289 sessions (1990-03-01 → 2026-09-25) Sealed cut: 2019-06-28 |
+45.54% | Bollinger Band Bounce Mean Reversion |
+54.14% (+8.60 pts) 22 sealed trades |
No proof yet (2/4 steps) Judge engine, computed on CAC 40 |
| Silver (SLV) Precious Metals |
5,135 sessions (2006-04-28 → 2026-09-25) Sealed cut: 2022-08-23 |
+229.31% | Stochastic RSI Mean Reversion |
+218.54% (-10.77 pts) 25 sealed trades |
No proof yet (1/4 steps) Judge engine, computed on Silver (SLV) |
| Oil (USO) Energy |
5,148 sessions (2006-04-10 → 2026-09-25) Sealed cut: 2022-08-19 |
+99.88% | Stochastic RSI Mean Reversion |
+62.64% (-37.24 pts) 23 sealed trades |
No edge evidence (1/4) Judge engine, computed on Oil (USO) |
Full 26 × 8 matrix: sealed return vs holding & judge engine verdict per asset
When training made fewer than 10 trades, the engine does not open the sealed period (“—”). Every cell pairs the out-of-sample excess over holding with the verdict of the judge engine on that market.
| Pine v5 Rule | Bitcoin | Gold (GLD) | S&P 500 | Nasdaq 100 | DAX 40 | CAC 40 | Silver (SLV) | Oil (USO) |
|---|---|---|---|---|---|---|---|---|
|
EMA Crossover 9/21 Trend Following · Judge → |
+26.1 pts Inconclusive (3/4) |
-35.8 pts Inconclusive (1/4) |
-41.3 pts Inconclusive (1/4) |
-82.3 pts Inconclusive (2/4) |
-92.1 pts Inconclusive (2/4) |
-72.4 pts No edge |
-223.4 pts Inconclusive (1/4) |
-102.4 pts No edge |
|
Golden Cross SMA 50/200 Trend Following · Judge → |
— Few trades |
-36.6 pts Few trades |
-21.9 pts Few trades |
-19.7 pts Few trades |
-95.0 pts Few trades |
-24.2 pts Few trades |
— Few trades |
-83.3 pts Few trades |
|
SuperTrend Trend Following · Judge → |
-6.7 pts Few trades |
-100.8 pts Inconclusive (1/4) |
-119.7 pts Inconclusive (1/4) |
-67.2 pts Inconclusive (1/4) |
-119.9 pts Inconclusive (2/4) |
-52.1 pts No edge |
-118.7 pts Inconclusive (1/4) |
-74.1 pts Inconclusive (1/4) |
|
RSI Mean Reversion Mean Reversion · Judge → |
+48.6 pts Few trades |
-125.8 pts Few trades |
-91.3 pts Few trades |
-107.7 pts Few trades |
+43.9 pts Few trades |
+15.2 pts Few trades |
-156.6 pts Few trades |
-43.9 pts Few trades |
|
MACD Momentum Momentum & Volume · Judge → |
+7.2 pts No edge |
-90.6 pts Inconclusive (2/4) |
-99.2 pts Inconclusive (1/4) |
-90.8 pts Inconclusive (1/4) |
-93.6 pts Inconclusive (1/4) |
-14.5 pts No edge |
-162.8 pts Inconclusive (1/4) |
-128.1 pts No edge |
|
Bollinger Band Bounce Mean Reversion · Judge → |
+19.0 pts Few trades |
-109.6 pts Inconclusive (2/4) |
-62.6 pts Inconclusive (2/4) |
-107.3 pts Inconclusive (1/4) |
-18.3 pts Inconclusive (1/4) |
+8.6 pts Inconclusive (2/4) |
-113.0 pts Inconclusive (1/4) |
-58.5 pts Few trades |
|
Bollinger Squeeze Breakout Volatility Breakout · Judge → |
+5.1 pts No edge |
-94.7 pts Inconclusive (1/4) |
-145.3 pts No edge |
-125.8 pts No edge |
-149.6 pts No edge |
-55.2 pts No edge |
-213.9 pts No edge |
-109.7 pts No edge |
|
Keltner Channel Breakout 20/1.5 Volatility Breakout · Judge → |
+17.5 pts No edge |
-80.5 pts Inconclusive (1/4) |
-119.5 pts Inconclusive (1/4) |
-81.0 pts Inconclusive (1/4) |
-130.2 pts Inconclusive (1/4) |
-43.6 pts No edge |
-173.9 pts Inconclusive (1/4) |
-112.2 pts No edge |
|
Donchian Turtle 20/10 Volatility Breakout · Judge → |
+5.0 pts No edge |
-102.3 pts Inconclusive (1/4) |
-68.5 pts Inconclusive (1/4) |
-71.9 pts Inconclusive (1/4) |
-135.2 pts No edge |
-70.7 pts No edge |
-209.2 pts No edge |
-110.0 pts No edge |
|
ADX 25 & DMI 14 Trend Trend Following · Judge → |
+0.7 pts No edge |
-103.7 pts Inconclusive (1/4) |
-118.5 pts Inconclusive (1/4) |
-106.5 pts Inconclusive (1/4) |
-136.6 pts No edge |
-68.2 pts No edge |
-150.5 pts Few trades |
-103.7 pts No edge |
|
Stochastic RSI Mean Reversion · Judge → |
+9.7 pts No edge |
-61.6 pts Inconclusive (1/4) |
-100.8 pts Inconclusive (1/4) |
-111.1 pts Inconclusive (1/4) |
-74.3 pts Inconclusive (1/4) |
-30.4 pts Inconclusive (1/4) |
-10.8 pts Inconclusive (1/4) |
-37.2 pts No edge |
|
Parabolic SAR 0.02/0.2 Trend Following · Judge → |
+14.4 pts No edge |
-61.0 pts Inconclusive (1/4) |
-107.0 pts No edge |
-118.3 pts Inconclusive (1/4) |
-108.9 pts Inconclusive (1/4) |
-19.7 pts No edge |
-211.2 pts Inconclusive (1/4) |
-102.0 pts No edge |
|
VWAP Bounce Momentum & Volume · Judge → |
-6.3 pts No edge |
-169.9 pts No edge |
-183.9 pts No edge |
-158.2 pts No edge |
-163.8 pts No edge |
-95.0 pts No edge |
-147.1 pts No edge |
-93.9 pts No edge |
|
Hull Moving Average 55 Trend Following · Judge → |
+31.3 pts Inconclusive (3/4) |
-46.8 pts Inconclusive (1/4) |
-76.5 pts Inconclusive (1/4) |
-77.5 pts Inconclusive (2/4) |
-107.7 pts Inconclusive (2/4) |
-49.8 pts No edge |
-162.6 pts Inconclusive (1/4) |
-102.3 pts No edge |
|
ALMA 20 Gaussian Trend Trend Following · Judge → |
+31.3 pts Inconclusive (3/4) |
-44.1 pts Inconclusive (1/4) |
-47.7 pts Inconclusive (2/4) |
-64.4 pts Inconclusive (2/4) |
-99.0 pts Inconclusive (2/4) |
-56.3 pts No edge |
-205.3 pts Inconclusive (1/4) |
-74.9 pts Inconclusive (1/4) |
|
CCI 20 (+100) Breakout Momentum & Volume · Judge → |
+32.3 pts Inconclusive (3/4) |
-79.3 pts Inconclusive (1/4) |
-88.9 pts Inconclusive (1/4) |
-76.4 pts Inconclusive (1/4) |
-119.5 pts Inconclusive (2/4) |
-52.4 pts No edge |
-212.9 pts Inconclusive (1/4) |
-96.1 pts Inconclusive (1/4) |
|
Money Flow Index MFI 14 (20/80) Momentum & Volume · Judge → |
— Few trades |
-117.2 pts Few trades |
-39.1 pts Few trades |
-117.8 pts Few trades |
-84.3 pts Few trades |
+52.9 pts Few trades |
-196.0 pts Few trades |
+24.0 pts Few trades |
|
ATR 14 Chandelier Stop Volatility Breakout · Judge → |
+13.1 pts Few trades |
-75.4 pts Inconclusive (1/4) |
-72.6 pts Inconclusive (2/4) |
-75.0 pts Inconclusive (2/4) |
-153.4 pts No edge |
-77.8 pts No edge |
-150.7 pts Inconclusive (1/4) |
-135.7 pts No edge |
|
Ichimoku Tenkan 9 / Kijun 26 Trend Following · Judge → |
+13.4 pts Few trades |
-81.9 pts Inconclusive (2/4) |
-139.3 pts Inconclusive (1/4) |
-84.7 pts Inconclusive (1/4) |
-130.8 pts Inconclusive (2/4) |
-56.9 pts No edge |
-241.0 pts No edge |
-126.9 pts Few trades |
|
Linear Regression 20 Trend Following · Judge → |
+29.4 pts Few trades |
-90.7 pts No edge |
-99.7 pts Inconclusive (2/4) |
-91.2 pts Inconclusive (2/4) |
-175.0 pts No edge |
-69.7 pts No edge |
-194.1 pts Inconclusive (1/4) |
-58.7 pts Inconclusive (1/4) |
|
ROC 14 + EMA 200 Filter Momentum & Volume · Judge → |
+36.1 pts Few trades |
-97.6 pts Inconclusive (1/4) |
-127.4 pts Inconclusive (1/4) |
-92.8 pts No edge |
-119.3 pts Inconclusive (2/4) |
-41.8 pts No edge |
-211.7 pts No edge |
-107.8 pts No edge |
|
EMA Ribbon 8/21/55 Trend Following · Judge → |
+15.5 pts No edge |
-27.4 pts Inconclusive (1/4) |
-93.7 pts Inconclusive (1/4) |
-97.3 pts Inconclusive (2/4) |
-133.9 pts No edge |
-75.1 pts No edge |
-219.8 pts Inconclusive (1/4) |
-70.9 pts Inconclusive (1/4) |
|
Williams %R 14 Pullback Mean Reversion · Judge → |
+22.7 pts No edge |
-96.6 pts No edge |
-129.3 pts Inconclusive (1/4) |
-127.3 pts Inconclusive (1/4) |
-145.3 pts No edge |
-58.2 pts No edge |
-210.5 pts No edge |
-119.0 pts No edge |
|
No-Leak Weekly EMA Filter Multi-Timeframe & AI · Judge → |
+5.6 pts No edge |
-96.1 pts Inconclusive (1/4) |
-154.9 pts No edge |
-133.3 pts No edge |
-173.5 pts No edge |
-88.8 pts No edge |
-167.9 pts Inconclusive (1/4) |
-67.3 pts Inconclusive (1/4) |
|
Pivot High/Low Breakout Volatility Breakout · Judge → |
+16.8 pts Few trades |
-21.4 pts Inconclusive (1/4) |
-116.3 pts Inconclusive (1/4) |
-125.7 pts Inconclusive (1/4) |
-112.4 pts Inconclusive (1/4) |
-58.2 pts No edge |
-159.2 pts Inconclusive (1/4) |
-121.9 pts No edge |
|
AI-style ATR Breakout + EMA 200 Multi-Timeframe & AI · Judge → |
+10.4 pts Few trades |
-94.6 pts Inconclusive (1/4) |
-121.1 pts Inconclusive (1/4) |
-91.9 pts Inconclusive (1/4) |
-145.7 pts No edge |
-72.6 pts No edge |
-140.7 pts Inconclusive (1/4) |
-136.1 pts No edge |
Test your own rule on any market in 2 minutes
You do not have to rely on Bitcoin alone to check a Pine v5 strategy before risking capital:
- In the free online judge (/en/strategy-judge), open “Another market than BTCUSDT? Test on your own candles (CSV file)” and drop your daily or intraday OHLCV CSV (read locally in your browser, never uploaded).
- In the free desktop Strategy Arena Lab (/en/download), replay your rule locally on multi-year histories with trial counting.
- If your Pine script uses constructs specific to TradingView or non-crypto symbols, export the Strategy Tester's “List of trades” CSV (available on TradingView Essential plans and above) into /en/dossier for a free preview (before/after cut date and fee impact).
Online judge & desktop Lab: €0. Full TradingView trade-list audit dossier: €9 one-time payment (or 1 credit; €9 / €25 / €49 credit packs), no account required, with a 7-day full refund guarantee if the dossier teaches you nothing beyond the free preview or the TradingView Strategy Tester.
Data sources, spectral diversity & related benchmarks
Bitcoin (BTCUSDT): Binance daily candles from the online judge (2017-08-17 to 2026-10-16; Binance candles, terms: /static/juge/data/v3/LICENSE.txt), matching /en/pine-scripts 26 out of 26. Other 7 markets: aggregated research metrics computed on 2026-11-29 from daily Yahoo Finance bars (files dated 2026-09-30, last session 2026-09-25; no raw series redistributed). Important nuances: SPY and QQQ closes are not adjusted for dividends, DAX 40 is a total-return performance index (reinvested dividends), and CAC 40 is a price index.
Effective market diversity (Ledoit & Wolf 2004 analytical shrinkage on the 2,247 common trading sessions across all 8 markets, with zero missing-day zero-filling): optimal shrinkage δ* = 0.0223, yielding 4.11 effective independent market bets out of 8 (4.02 before shrinkage).
- Bitcoin 3-Timeframe Benchmark (1D, 4H, 1H) — How timeframe granularity affects fee drag on BTCUSDT.
- 29 Free Pine Script v5 Strategy Sheets — Full source code, parameters and BTC verdicts for each rule.
- 17 Classic Market Rules Tested on Unseen Years — Out-of-sample protocol applied to literature rules.
Frequently asked questions
Why show the judge engine's verdict next to “ahead of Buy & Hold”?
Finishing ahead of Buy & Hold on one 20% window is only one of the four steps measured by the judge engine: the rule must also make at least 10 training trades and 10 sealed trades, clear the 95% training Deflated Sharpe bar, and rule out chance via the stationary bootstrap SPA test.
How can I test my own Pine v5 rule on Gold, S&P 500 or Forex for free?
The online judge natively holds BTCUSDT candles, and also replays any OHLCV CSV file (time, open, high, low, close, volume) whose data you have the right to use: open “Use my candles (CSV file)” and drop your file locally in your browser.
Why are some cells marked “—”?
When a rule makes fewer than 10 trades on the 80% training history (such as SMA 50/200 Golden Cross on daily bars), the engine keeps the 20% test period sealed rather than publishing a noisy 1- or 2-trade figure.
Historical research on past market data, never investment advice or a promise of future returns. Pine Script® is a trademark of TradingView.