Strategy code

Strategy source code

Download the current Python strategy modules with a default-parameter example runner, plus TradingView Pine Script versions where a single chart can express the rule.

Strategies72
With Pine Script55
LanguagePython 3 · Pine v5
PriceFree

Run your first example

Install the dependencies once, then download an example below and run its command in the download folder.

pip install pandas numpy yfinance

Each command prints the available date range, total return, CAGR, Sharpe ratio, and maximum drawdown for SPY using the strategy's default parameters.

StrategyTypePythonPine Script
ADX Trend Filter
ADX-01
Single marketDownloadDownload
Turn of Month
CAL-01
Single marketDownloadDownload
FX Carry
CARRY-01
BasketDownload—
Bollinger-Keltner Squeeze
COMBO-01
Single marketDownloadDownload
MACD + RSI Filter
COMBO-02
Single marketDownloadDownload
Divergence Strategy
COMBO-03
Single marketDownload—
Trend + Mean Reversion Hybrid
COMBO-04
Single marketDownloadDownload
Cross-Sectional Momentum
CS-01
BasketDownload—
Low Volatility Rotation
CS-02
BasketDownload—
Trend + Macro Filter
EVENT-01
Single marketDownloadDownload
Multi-Factor Composite
FACTOR-05
BasketDownload—
HMA Crossover
HMA-01
Single marketDownloadDownload
Keltner Channel Breakout
KC-01
Single marketDownloadDownload
Cross-Asset Momentum
MACRO-01
BasketDownload—
Risk-On/Risk-Off Switch
MACRO-02
BasketDownload—
Flight to Quality
MACRO-03
BasketDownload—
Time-Series Momentum
MOM-01
Single marketDownloadDownload
Dual Momentum
MOM-02
BasketDownload—
52-Week High Momentum
MOM-03
Single marketDownloadDownload
Asset Class Rotation
MOM-04
BasketDownload—
Faber TAA
MOM-05
BasketDownload—
Residual Momentum
MOM-06
Single marketDownloadDownload
Accelerating Momentum
MOM-10
Single marketDownloadDownload
Momentum Crash Protection
MOM-11
Single marketDownloadDownload
RSI Mean Reversion
MR-01
Single marketDownloadDownload
Bollinger Band Reversion
MR-02
Single marketDownloadDownload
Kalman Filter Mean Reversion
MR-03
Single marketDownloadDownload
Ornstein-Uhlenbeck Mean Reversion
MR-04
Single marketDownloadDownload
CCI Mean Reversion
MR-05
Single marketDownloadDownload
Z-Score Mean Reversion
MR-06
Single marketDownloadDownload
Hurst-Filtered Mean Reversion
MR-07
Single marketDownloadDownload
Stochastic Oscillator Reversion
MR-10
Single marketDownloadDownload
Williams %R Reversion
MR-11
Single marketDownloadDownload
Money Flow Index Reversion
MR-12
Single marketDownloadDownload
TRIX Reversion
MR-13
Single marketDownloadDownload
Detrended Price Oscillator
MR-14
Single marketDownloadDownload
Ultimate Oscillator
MR-15
Single marketDownloadDownload
Connors RSI
MR-16
Single marketDownloadDownload
Risk Parity
PORT-01
BasketDownload—
Minimum Variance
PORT-02
BasketDownload—
Hierarchical Risk Parity
PORT-05
BasketDownload—
Regime Switch
REG-01
Single marketDownloadDownload
HMM Regime Detection
REG-10
Single marketDownloadDownload
Volatility Regime Switch
REG-14
Single marketDownloadDownload
Drawdown Control
RISK-01
Single marketDownloadDownload
Stop Loss Overlay
RISK-03
Single marketDownloadDownload
Trailing Stop Strategy
RISK-04
Single marketDownloadDownload
Volatility Target
RP-01
Single marketDownloadDownload
Parabolic SAR
SAR-01
Single marketDownloadDownload
Monthly Seasonality
SEAS-01
Single marketDownloadDownload
SPY-GLD Pair
STAT-01
BasketDownload—
Dynamic Hedge Ratio Pairs
STAT-10
BasketDownload—
Cointegration Basket
STAT-11
BasketDownload—
Supertrend
SUPER-01
Single marketDownloadDownload
Crisis Alpha
TAIL-01
Single marketDownloadDownload
Donchian Breakout
TREND-02
Single marketDownloadDownload
Dual Moving Average
TREND-05
Single marketDownloadDownload
Ichimoku Cloud
TREND-10
Single marketDownloadDownload
Kaufman Adaptive Moving Average
TREND-11
Single marketDownloadDownload
MACD Strategy
TREND-12
Single marketDownloadDownload
Triple Moving Average
TREND-13
Single marketDownloadDownload
Linear Regression Channel
TREND-14
Single marketDownloadDownload
Darvas Box
TREND-15
Single marketDownloadDownload
Aroon Indicator
TREND-16
Single marketDownloadDownload
Chandelier Exit
TREND-17
Single marketDownloadDownload
Coppock Curve
TREND-18
Single marketDownloadDownload
Elder Triple Screen
TREND-19
Single marketDownloadDownload
Vortex Indicator
TREND-20
Single marketDownloadDownload
Turtle Trading
TURTLE-01
Single marketDownloadDownload
Volatility Breakout
VOL-01
Single marketDownloadDownload
Volatility Risk Premium
VOL-10
Single marketDownloadDownload
Volatility Regime Strategy
VOL-13
Single marketDownloadDownload

How to use the files

  • Python files run on their own: install pandas, numpy and yfinance, then run the file with a ticker or a CSV of daily prices.
  • Pine files: use the Pine icon in TradingView's right toolbar to open the editor. Paste the script, select Add to chart, and use the daily timeframe.
  • Each download page shows its TradingView test status. Use Python for the site's backtest rules. Market data and simulated fills can differ.
  • A position decided at today's close earns tomorrow's return. Results are before trading costs.
  • The example runner uses current prices and default parameters, not the site's walk-forward fits. Evidence downloads include archived source and replay the published run's recorded arithmetic. Recomputing strategy decisions requires the exact original inputs, which may not be public.

Free to use and modify. Provided as is, for research and education. Historical backtests do not predict future returns. Not investment advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.