Strategy explained
20/50 EMA crossover strategy: how it works and how to backtest it
By the PaisaTrade editorial team Reviewed on
An EMA crossover strategy buys when a faster exponential moving average (20-day) rises above a slower one (50-day), and sells when it falls back below.
The rule in plain words
- Buy when the 20-day EMA crosses above the 50-day EMA.
- Sell when the 20-day EMA crosses back below the 50-day EMA.
- No stop-loss or target in the basic version.
Why traders use it
An exponential moving average (EMA) gives more weight to recent prices than a simple average, so it turns faster when the trend changes.
Compared with the 50/200 golden cross, the 20/50 EMA pair reacts much earlier. It enters trends sooner and exits sooner, and it trades more often.
Where it goes wrong
- Faster signals mean more false signals. In a sideways market it gets whipsawed often.
- More trades mean more costs.
- Without a stop-loss, a sudden gap down can cause a large loss before the averages cross.
- It still lags. Like every moving-average rule, it reacts after the price has moved.
How to read your backtest
- Run this preset and the golden cross on the same stock and period, then compare the number of trades, return and drawdown.
- Check the result against buy and hold. Many crossover rules reduce drawdown but also reduce return.
- Add a stop-loss in the Strategy Lab and see whether it helps or hurts.
- Test several stocks. A single good result proves very little.
Try it yourself, free
Run this rule on any NSE stock PaisaTrade covers. No code, no account needed to test.
Backtest the EMA crossoverStrategy Lab uses daily prices that end 30 days before today and includes a trading cost on every trade. Results are hypothetical and for learning only.
Common questions
What is the difference between EMA and SMA?
A simple moving average (SMA) weighs every day in the period equally. An exponential moving average (EMA) weighs recent days more, so it follows the price more closely and turns sooner.
Is the 20/50 EMA better than the golden cross?
Neither is better in general. The 20/50 EMA is faster and trades more; the 50/200 SMA is slower and trades less. A backtest on the same stock shows the trade-off for that period only.
Can I change the EMA lengths?
Yes. Open the preset in the Strategy Lab and edit the periods, for example 9 and 21, then run it again and compare.
This guide is for education only and is not investment, legal or tax advice. PaisaTrade is not a stock broker and not a SEBI-registered investment adviser or research analyst. Past and hypothetical results do not predict future returns.