EMA crossover: how it works and how to test it
An EMA (exponential moving average) is a moving average that weights recent prices more heavily than old ones. An EMA crossover happens when a faster average crosses above or below a slower one, and traders read that as a change in trend.
Open the free scannerEMA versus SMA
A simple moving average (SMA) gives every day in its window the same weight. An EMA gives the most recent days more weight, so it turns sooner and reacts faster to a change in direction, at the cost of more false signals in choppy markets.
Common settings
- 21 EMA: a short-term trend line. Strong stocks often pull back to it and bounce.
- 50 EMA or 50 SMA: the intermediate trend that many traders use as a dividing line.
- 200-day average: the long-term trend, often used as a market filter.
- Crossovers: for example a 10-week average crossing above a 40-week one, or 21 above 50 on daily charts.
Testing a crossover in the scanner
The scanner’s MA crossover backtest lets you choose SMA or EMA, set the fast and slow periods, and test weekly crossover signals using only information available on each date. You can add RS and liquidity filters, a stop, a trailing exit and a market filter such as “only when the index is above its EMA 50”, then compare the result with the benchmark. Read how the backtests avoid hindsight first.
Limits of crossovers
Crossovers are lagging: by the time they signal, a good part of the move has often happened. They produce many false signals in sideways markets, and results depend heavily on the settings. Combine them with relative strength and a market-trend filter rather than using them alone.
A worked example
On a weekly chart, the 10-week EMA is at 98 and the 40-week EMA at 100. The next week the 10-week EMA rises to 101, above the 40-week EMA at 100.2: a bullish crossover. A rule that buys at the next week’s close and holds until the fast average crosses back below would have exited when the 10-week fell under the 40-week. In a sideways market the same rule would have produced several small losses.
Strategy examples
These are illustrative rule sets that show how the scanner can be used. They are not recommendations or advice, the numbers are examples, and rules like these can lose money. Test any idea on your own and manage risk before acting.
Weekly crossover with filters
- Open the MA crossover backtest and choose EMA, fast 10, slow 40 weeks.
- Add RS 70 or higher and a liquidity filter so only strong, tradable stocks count.
- Run it with costs and tax switched on, and compare with the benchmark.
- Check it on a different period before trusting it.
Pullback to the 21 EMA
- Find strong stocks (RS 80 or higher, above a rising 50-day average).
- Wait for a pullback toward the 21 EMA on the chart.
- Look for a close back above the 21 EMA on rising volume.
- Use a close below the 21 EMA, or a stop below the pullback low, to exit.
Market regime filter
- Test the rule only when the index is above its EMA 50 (an option in the backtest tools).
- Compare with the same rule without the filter.
- Keep the filter only if it improves the worst periods, not just the average.
Common mistakes
- Picking the settings that look best on past data.
- Trading every crossover in a sideways market.
- Ignoring costs and tax, which hit frequent signals hardest.
- Using a crossover alone with no relative-strength or market filter.
Frequently asked questions
What is an EMA crossover?
When a faster exponential moving average crosses above or below a slower one. A cross above is read as a bullish change in trend and a cross below as bearish.
Which EMA settings are best?
There is no best setting. The result depends on the market and period. Test several and prefer settings that work across a range of values.
Is EMA better than SMA?
EMA reacts faster, SMA is smoother. Neither is better in every market.
Does an EMA crossover predict price?
No. It describes what has already happened.