Trend Crossover✓ Audited v5

Dual EMA 9/21 Trend Crossover

by Backpulse Quant Lab ✓

The time-tested dual exponential moving average strategy using 9-period fast EMA and 21-period slow EMA with 200 EMA macro trend direction filtering.

15m1H4H
Start 3-day free trial

Strategy performanceTick data

Real tick dataFees (0.04%) and slippage included
Profit factor1.95
Scale 0 to 4 · gross win / loss
Sharpe ratio1.82
Scale 0 to 4 · risk-adjusted
Max drawdown9.1%
Scale 0 to 20% · peak to trough, lower is better

Past results do not guarantee future performance.

Best for

Beginner and intermediate algorithmic traders seeking clean, transparent trend logic.

All Markets

Built-in 200 EMA macro trend filter

Lowest calculation overhead for high-frequency bots

Sub-300ms webhook alert triggers for all exchanges

Optimal parameter settings

Discovered across 50,000+ historical simulations on real tick data, with fees and slippage included.

Fast EMA

Fast moving average lookback.

Default9
Recommended9
Slow EMA

Slow moving average lookback.

Default21
Recommended21
Macro Filter EMA

Long-term trend baseline filter.

Default200
Recommended200

Use this strategy

Copy the code into TradingView, or send its alerts straight to your exchange.

dual_ema_crossover.pine
1//@version=5
2strategy("Dual EMA 9/21 Trend Strategy", overlay=true, initial_capital=10000)
3
4fastEMA = ta.ema(close, 9)
5slowEMA = ta.ema(close, 21)
6macroEMA = ta.ema(close, 200)
7
8if (ta.crossover(fastEMA, slowEMA) and close > macroEMA)
9 strategy.entry("Long", strategy.long)
10if (ta.crossunder(fastEMA, slowEMA) and close < macroEMA)
11 strategy.entry("Short", strategy.short)

Add it to TradingView

  1. Copy the codeUse the button above
  2. Open the Pine EditorPaste it and press Save
  3. Add to chartStrategy Tester shows the history
Automation

Send alerts straight to your exchange

Paste the JSON payload into a TradingView alert. Orders execute within 300ms on your connected exchange.

BinanceBybitOKXTradovate
Keep exploring

Similar strategies.

Compared with Dual EMA Crossover (61.5% win rate).

Mean Reversion & Divergence
70.2%Win rate
+8.7 pts vs Dual EMA Crossover
RSI Divergence Strategy
Profit factor2.51
Sharpe2.44
Max DD5.9%
Trend & Scalping
68.4%Win rate
+6.9 pts vs Dual EMA Crossover
UT Bot Alerts
Profit factor2.35
Sharpe2.41
Max DD6.8%
Trend Following
64.2%Win rate
+2.7 pts vs Dual EMA Crossover
Supertrend Strategy
Profit factor2.18
Sharpe2.12
Max DD7.9%
Ready to test it

Backtest and automate Dual EMA Crossover.

Test 20,000 parameter combinations in seconds and auto-execute the signals on your exchange.

Pro free for 3 daysNo credit cardCancel anytime

Backtested results are hypothetical and do not guarantee future performance. Trading involves substantial risk of loss.

Dual EMA CrossoverFree 3-day trial
Start free