Moving Averages: SMA vs EMA and How Traders Use Them
A moving average smooths price into a trend line. Learn SMA vs EMA, what the 20, 50 and 200-day averages tell you, how crosses work, and why they whipsaw in sideways markets.
A moving average is the average closing price of a stock over a set number of periods, plotted as a line that updates each bar. It smooths out day-to-day noise so the trend is easier to see. The two main types are the simple moving average (SMA), which weights every day equally, and the exponential moving average (EMA), which weights recent days more.
This guide explains the difference, the popular 20, 50 and 200-day lengths, how moving averages act as support and resistance, how golden and death crosses work, and where the tool fails. It is educational only, not financial advice.
Key takeaways
- The SMA gives equal weight to every bar and is slower and smoother; the EMA weights recent prices more and reacts faster.
- The 20-day reads short-term trend, the 50-day intermediate trend and the 200-day long-term trend; stocks above all three are in the strongest position.
- A rising moving average often acts as dynamic support in an uptrend, but it only works while a clear trend exists.
- A golden cross (50-day above 200-day) and death cross (50-day below 200-day) are lagging confirmations, not entry signals.
- In sideways markets, crossovers whipsaw: price crosses back and forth and generates repeated false signals.
What is a moving average?
A moving average takes the last N closing prices, averages them, and repeats on every new bar, so the line "moves" with price. Because it averages many days, a one-day spike barely moves it. That is why price above a rising moving average describes an uptrend and price below a falling one describes a downtrend.
It is a lagging indicator: it is built from past prices, so it confirms trends rather than predicting them. A longer period gives a smoother line that lags more; a shorter period follows price closely and gives more false signals.
What is the difference between SMA and EMA?
The SMA is a plain average; the EMA gives recent closes more weight, so it turns sooner.
- SMA: add the last N closes and divide by N. For closes of 10, 11, 12, 13 and 14, the 5-day SMA is 12. Every day counts equally, and when an old day drops out of the window, the line can jump.
- EMA: each new value is the previous EMA plus a smoothing share of the difference between today's close and the previous EMA. The multiplier is 2 divided by (N + 1). For a 20-day EMA that is about 0.095. If the previous EMA is $100 and today closes at $105, the new EMA is $100 plus 0.095 times $5, or about $100.48.
| SMA | EMA | |
|---|---|---|
| Weighting | Equal | Recent prices count more |
| Speed | Slower | Faster |
| Noise | Fewer false signals | More false signals |
| Common use | 50 and 200-day benchmarks | 9, 20, 21-day trend and entries |
Neither is better in the abstract. A common split is EMAs for short lengths (9, 20 or 21) where speed helps entries, and SMAs for long lengths (50, 200) because those are the levels most market participants quote and watch. See the 9/21 EMA crossover for a faster-moving example.
What do the 20, 50 and 200-day averages tell you?
Each common length answers a different question about trend.
What does the 20-day moving average show?
The 20-day covers about one trading month and shows the short-term trend. In a healthy uptrend, stocks often pull back to the 20-day and find buyers there. Repeated closes below it, especially on heavy volume, suggest momentum is fading.
What does the 50-day moving average show?
The 50-day covers about ten weeks and shows the intermediate trend. It is the line many swing traders and funds treat as the dividing line between a pullback and a deeper correction. A breakdown below it matters more than a dip under the 20-day. See the 50-day pullback strategy.
What does the 200-day moving average show?
The 200-day covers about 40 weeks and shows the long-term trend. Stocks above it are broadly considered to be in a bull phase and those below in a bear phase. It rarely gives trade timing on its own, but it sets the backdrop: longs tend to work better above it.
There is nothing magic about 20, 50 or 200. These lengths matter because so many people watch them, which can make them self-reinforcing levels, but a stock may respect the 21-day or the 40-day instead. Look at how the stock actually behaved before choosing.
Do moving averages act as support and resistance?
Yes, in trends: a rising moving average often acts as dynamic support, and a falling one as dynamic resistance. Unlike a horizontal level, it moves with time, so in an uptrend the buying zone rises alongside price.
A pullback that touches a rising 20-day EMA is a normal pause; a close well below the 50-day suggests the trend needs reassessing. Confluence adds weight: a pullback that touches both a rising 50-day and a prior breakout level is a stronger setup than either alone.
The caveat is that support is not a floor. Moving averages work well in trends and poorly in chop, and a stock can slice through any average with no regard for it.
What are the golden cross and death cross?
A golden cross occurs when the 50-day crosses above the 200-day, and a death cross when it crosses below. They are the best-known moving average crossover signals.
- Golden cross: intermediate momentum has turned up relative to the long-term trend. Hypothetically, after a decline the 50-day SMA at $142 crosses above the 200-day at $139.
- Death cross: the opposite, a sign that momentum has deteriorated.
Both are lagging. By the time the 50-day crosses the 200-day, price has usually already moved a long way, and the cross can arrive near a short-term turning point in the other direction. They are better used as trend context (should I be looking for longs or staying cautious?) than as entry triggers. Index-level crosses get heavy media coverage, but media attention is not evidence that the signal works.
What is moving average stacking?
MA stacking means the averages are ordered in a clean sequence that reflects trend. In a bullish stack, price is above the 20-day, which is above the 50-day, which is above the 200-day, and the averages are rising. A bearish stack is the reverse.
A bullish stack is a core piece of the Minervini trend template, a checklist used by many growth traders; paid StockSetups plans include moving averages and that template as a filter. Used as a pre-filter, stacking helps you take breakouts in stocks already in strong trends rather than fighting a downtrend. For a multi-line version, see the EMA ribbon.
How do you trade a pullback to a moving average? (worked example)
A simple, common use is buying a pullback in an uptrend. Hypothetical numbers:
- Trend check: a stock trades at $85, above a rising 20-day EMA, 50-day SMA ($72) and 200-day SMA ($64). Bullish stack confirmed.
- Pullback: the stock falls over five sessions to $78.30, touching its 20-day EMA at $78.00 while volume dries up.
- Trigger: a hammer or bullish engulfing candle closes at $78.90; you buy at $79.00.
- Stop: $76.40, under the pullback low and the average. Risk is $2.60.
- Target: the prior high of $85. Reward is $6.00, so reward:risk is about 2.3:1.
If the stock closes below $76.40, the trend is no longer pulling back but breaking, and you exit. To manage the position after entry, an ATR trailing stop can follow the trend, and VWAP and moving average confluence refines the entry.
Why do moving averages whipsaw, and how do you reduce it?
A whipsaw is a signal that reverses quickly: price crosses above an average, you buy, and it falls back below. It happens because averages assume a trend, and sideways markets do not have one.
Ways to reduce it:
- Filter by trend. Only take signals in the direction of the 200-day slope or a bullish stack.
- Avoid flat averages. If the 50-day is flat, there is no trend to trade.
- Require a close and a margin. A daily close beyond the average by a set buffer (say 1%) beats an intraday poke.
- Use longer averages for fewer signals, accepting later entries.
- Combine with price structure and volume, not the average alone.
Common mistakes
- Treating an average as a precise level. It is a zone, not a line.
- Trading crosses in a range. Expect whipsaws and losses.
- Using too many averages. Three or four are enough; more adds clutter, not information.
- Ignoring the slope. Price above a falling average is not a bullish signal.
- Buying a cross after a big run. Lagging signals can arrive late.
Indicators fail, past results do not guarantee future results, and any trade can lose money. Manage risk and do your own research.
The bottom line
Moving averages turn noisy price into a readable trend. Use the SMA for broadly watched long-term levels and the EMA for faster entries, read the 20, 50 and 200-day together as short, intermediate and long-term trend, treat crosses as lagging context, and stay out of them when the market goes sideways.
StockSetups scans the full US universe after each close for chart patterns, sorting long setups into its four lanes, and paid plans add moving averages and the trend template so you can check whether a breakout candidate sits in a clean trend.
For a related trend signal, see the golden cross and death cross.
Frequently asked questions
Is the EMA better than the SMA?
Neither is better in general. The EMA reacts faster and suits short-term entries, while the SMA is smoother and its 50 and 200-day versions are widely watched benchmarks.
Which moving average is best for swing trading?
Many swing traders use the 20-day EMA or 21-day EMA for short-term trend and the 50-day SMA for intermediate trend. The best choice is the one the stock has respected historically.
Is a golden cross a buy signal?
Not by itself. A golden cross confirms that the trend has already turned up and is a lagging signal, so traders use it as context and wait for a proper entry setup.
What is the difference between a golden cross and a death cross?
A golden cross is the 50-day moving average crossing above the 200-day, while a death cross is the 50-day crossing below the 200-day. The first is seen as bullish and the second as bearish.
Why do moving average crossovers give false signals?
Averages assume a trend, so in sideways markets price crosses back and forth and creates repeated false signals. Trend filters and longer averages reduce, but do not remove, this problem.
Try it free
Produced with AI assistance and published under the StockSetups editorial guidelines.
Get daily signals & real-time alerts.
StockSetups scans ~12,300 US stocks & ETFs after every close and sorts every long setup into four ranked lanes — each with a trade plan — plus an always-on engine firing 35+ real-time intraday alerts. Free for 7 days, no credit card.
Start free — 7-day trial, no card →Free daily signals by email. Top 3 setups per lane after every close. No account needed.
Unsubscribe anytime · Privacy