Trend Following
SMA Crossover
The classic golden-cross / death-cross signal — slower than EMAs, fewer false positives.
The SMA crossover uses simple moving averages instead of exponential. The signal is slower to fire (good — fewer whipsaws) but slower to exit (bad — bigger giveback). The 50/200 SMA cross is the textbook "golden cross" signal used by every CNBC anchor for a reason: on daily charts of major indices, it actually works.
sma-crossover.pinePine Script v5
//@version=5
strategy("SMA Crossover 50/200", overlay=true)
fast_sma = ta.sma(close, 50)
slow_sma = ta.sma(close, 200)
if ta.crossover(fast_sma, slow_sma)
strategy.entry("Long", strategy.long)
if ta.crossunder(fast_sma, slow_sma)
strategy.close("Long")Deploy SMA Crossover as a Live Bot
Backtest on real data, then run it 24/7 on your MT5 account.
Get Started Free