Skip to content

Strategy Templates Gallery

Ready-to-use strategy templates for common trading approaches. Each template includes recommended settings and CLI commands.

Quick Start

# Interactive wizard (recommended for beginners)
tradai strategy wizard

# Direct command with options
tradai strategy new MyStrategy --category momentum --timeframe 15m -y

Available Commands

Command Description
tradai strategy wizard Interactive step-by-step creation
tradai strategy new NAME Create from template with options
tradai strategy list List registered strategies
tradai strategy info NAME Get strategy details
just test-package strategies/NAME Test strategy
just run-backtest NAME VERSION Run backtest

Template Categories

1. Trend Following

Best for: Capturing directional moves in trending markets

Setting Recommended
Timeframe 4h, 1d
Exchanges binance, bybit, okx
Stoploss -10% to -15%
Trailing Stop Yes
tradai strategy new TrendRider \
  --category trend-following \
  --timeframe 4h \
  --exchange binance \
  --symbols "BTC/USDT:USDT,ETH/USDT:USDT" \
  --stoploss -0.12 \
  --trailing-stop \
  --max-trades 3 \
  -y

Key indicators: EMA 20/50/200, ADX, Supertrend, Ichimoku Cloud


2. Mean Reversion

Best for: Fading extreme moves back to equilibrium

Setting Recommended
Timeframe 1h, 4h
Exchanges binance, kraken
Stoploss -5% to -8%
Trailing Stop Optional
tradai strategy new MeanRevBot \
  --category mean-reversion \
  --timeframe 1h \
  --exchange binance \
  --symbols "BTC/USDT:USDT,ETH/USDT:USDT,SOL/USDT:USDT" \
  --stoploss -0.06 \
  --max-trades 5 \
  -y

Key indicators: Bollinger Bands, RSI, Stochastic RSI, Z-score


3. Momentum Scalping

Best for: Quick trades on strong price movements

Setting Recommended
Timeframe 5m, 15m
Exchanges binance, bybit
Stoploss -2% to -5%
Trailing Stop Yes
tradai strategy new MomentumScalper \
  --category momentum \
  --timeframe 15m \
  --exchange bybit \
  --trading-mode futures \
  --symbols "BTC/USDT:USDT,ETH/USDT:USDT" \
  --stoploss -0.03 \
  --trailing-stop \
  --can-short \
  --max-trades 5 \
  --stake-amount 500 \
  -y

Key indicators: RSI momentum, MACD histogram, Volume profile, ROC


4. Breakout Trading

Best for: Trading range expansions and volatility spikes

Setting Recommended
Timeframe 15m, 30m, 1h
Exchanges binance, okx
Stoploss -5% to -8%
Trailing Stop Yes
tradai strategy new BreakoutHunter \
  --category breakout \
  --timeframe 30m \
  --exchange binance \
  --symbols "BTC/USDT:USDT,ETH/USDT:USDT,SOL/USDT:USDT,AVAX/USDT:USDT" \
  --stoploss -0.06 \
  --trailing-stop \
  --can-short \
  --max-trades 4 \
  -y

Key indicators: Donchian Channels, ATR, Volume confirmation, S/R levels


5. Grid Trading

Best for: Sideways markets with defined ranges

Setting Recommended
Timeframe 15m, 30m, 1h
Exchanges binance, kucoin, gate
Stoploss -15% to -20%
Trailing Stop No
tradai strategy new GridMaster \
  --category grid-trading \
  --timeframe 30m \
  --exchange binance \
  --symbols "BTC/USDT:USDT" \
  --stoploss -0.15 \
  --max-trades 10 \
  --stake-amount 200 \
  -y

Implementation notes: Define grid levels (e.g., 1% apart), set upper/lower bounds


6. DCA (Dollar Cost Averaging)

Best for: Long-term accumulation strategies

Setting Recommended
Timeframe 4h, 1d
Exchanges Any
Stoploss -20% to -30%
Trailing Stop Optional
tradai strategy new DCABot \
  --category dca \
  --timeframe 1d \
  --exchange binance \
  --trading-mode spot \
  --symbols "BTC/USDT,ETH/USDT" \
  --stoploss -0.25 \
  --max-trades 2 \
  --stake-amount 100 \
  -y

Implementation notes: Buy at regular intervals, increase on dips


7. ML-Driven Strategy

Best for: Machine learning predictions with FreqAI

Setting Recommended
Timeframe 1h, 4h
Exchanges binance
Stoploss -5% to -10%
ML Support freqai
tradai strategy new MLPredictor \
  --category ml-driven \
  --timeframe 1h \
  --exchange binance \
  --ml freqai \
  --symbols "BTC/USDT:USDT,ETH/USDT:USDT" \
  --stoploss -0.08 \
  --can-short \
  --max-trades 3 \
  -y

FreqAI notes: Uses advanced structure, supports LightGBM, XGBoost, CatBoost, PyTorch


8. Arbitrage

Best for: Exploiting price differences

Setting Recommended
Timeframe 5m, 15m
Exchanges Multiple
Stoploss -2% to -3%
Trailing Stop No
tradai strategy new ArbitrageBot \
  --category arbitrage \
  --timeframe 5m \
  --exchange binance \
  --symbols "BTC/USDT:USDT,ETH/USDT:USDT" \
  --stoploss -0.02 \
  --max-trades 5 \
  --stake-amount 2000 \
  -y

Exchange-Specific Templates

Hyperliquid (DEX)

Uses USDC and wallet authentication.

tradai strategy new HyperBot \
  --category momentum \
  --timeframe 15m \
  --exchange hyperliquid \
  --trading-mode futures \
  --stake-currency USDC \
  --symbols "BTC/USDC:USDC,ETH/USDC:USDC" \
  --stoploss -0.05 \
  --can-short \
  -y

Spot Trading (Kraken)

For conservative spot-only trading.

tradai strategy new SpotAccumulator \
  --category dca \
  --timeframe 4h \
  --exchange kraken \
  --trading-mode spot \
  --symbols "BTC/USD,ETH/USD" \
  --stoploss -0.15 \
  --max-trades 2 \
  -y

Custom Categories

Any category name is allowed (warning shown but proceeds):

tradai strategy new MyCustomStrategy \
  --category "volatility-breakout" \
  --timeframe 1h \
  -y

Post-Creation Workflow

# 1. Navigate to strategy
cd mystrategy

# 2. Install dependencies
uv sync

# 3. Edit strategy logic
code src/mystrategy/strategy.py

# 4. Run tests
uv run pytest

# 5. Run backtest
just run-backtest mystrategy 1.0.0

Development Commands

Command Description
just fmt Format code
just lint Lint code
just typecheck Type check
just check All checks (lint + typecheck + test)
just test-package strategies/NAME Test specific strategy

Tips

  1. Start simple: Use simple structure first, add complexity later
  2. Test thoroughly: Backtest with multiple timeranges
  3. Risk management: Never skip stoploss
  4. Paper trade first: Use dry_run: true before live
  5. Monitor: Track metrics in MLflow

See Also