Moving Averages Explained: SMA vs EMA
Moving averages are the most widely used technical indicator in trading. They smooth out price data to reveal the underlying trend, filter out noise, and generate clear buy/sell signals. If you only learn one indicator, make it this one.
There are two main types: Simple Moving Average (SMA) and Exponential Moving Average (EMA). Both serve the same purpose, but they calculate differently and behave differently in fast-moving markets.
Simple Moving Average (SMA)
The SMA is the arithmetic mean of the closing prices over a specified number of periods. A 20-day SMA adds the closing prices of the last 20 days and divides by 20.
SMA = (P1 + P2 + P3 + ... + Pn) / n
Each day's price carries equal weight. When a new day is added, the oldest day drops off. This makes the SMA straightforward to calculate and easy to interpret.
The drawback is lag. Because all days are weighted equally, the SMA is slow to react to sudden price changes. A sharp gap up today has the same impact on a 20-day SMA as a small move 19 days ago.
Exponential Moving Average (EMA)
The EMA solves the lag problem by giving more weight to recent prices. The most recent closing price has the highest impact on the EMA value, and older prices gradually fade in influence.
The weighting uses a smoothing multiplier: 2 / (period + 1). For a 20-day EMA, the multiplier is 2/21 = 0.0952. This means today's price gets roughly 9.5% of the weight, and the remaining 90.5% comes from the previous EMA value.
EMA = (Close - Previous EMA) x Multiplier + Previous EMA
The result is a line that follows price more closely than the SMA, reacting faster to reversals and breakouts.
SMA vs EMA: Side-by-Side Comparison
| Feature | SMA | EMA |
|---|---|---|
| Calculation | Equal weight to all periods | More weight to recent prices |
| Responsiveness | Slower, more lag | Faster, less lag |
| False signals | Fewer (due to smoothing) | More (reacts to noise) |
| Best for | Identifying longer-term trends | Short-term trading, fast markets |
| Common use | 50-day, 200-day | 9-day, 12-day, 21-day |
Common Moving Average Periods
Different periods serve different purposes:
- 9 or 10 EMA – very short-term trend. Day traders use this to ride momentum.
- 20 SMA/EMA – short-term trend. Swing traders use this as a trailing stop and trend filter.
- 50 SMA – medium-term trend. Institutional traders watch this closely. A stock above its 50-day MA is generally considered in an uptrend.
- 200 SMA – long-term trend. The dividing line between bull and bear. A stock above the 200-day MA is bullish; below is bearish.
Golden Cross and Death Cross
These are the two most widely followed moving average signals:
Golden Cross: the 50-day SMA crosses above the 200-day SMA. This signals that the medium-term trend has turned bullish and often precedes extended rallies. It is a lagging signal, so a portion of the move has already happened by the time it triggers.
Death Cross: the 50-day SMA crosses below the 200-day SMA. This signals that the medium-term trend has turned bearish. It warns of potential further downside, though false signals occur in choppy markets.
Using Moving Averages as Support and Resistance
Moving averages act as dynamic support and resistance levels that move with price. In an uptrend, the 20-day or 50-day MA often serves as a level where pullbacks find buyers. In a downtrend, these averages act as ceilings where rallies fail.
This behavior is partly self-fulfilling. Because millions of traders watch the 50-day and 200-day MAs, their collective buying and selling at these levels reinforces the support/resistance effect.
Moving Average Crossover Strategy
A basic but effective trading strategy uses two moving averages of different periods:
- Apply a fast MA (e.g., 9 EMA) and a slow MA (e.g., 21 EMA) to a daily chart
- Buy when the fast MA crosses above the slow MA
- Sell when the fast MA crosses below the slow MA
- Use a stop-loss based on the slow MA or a fixed percentage (try the stop-loss calculator for guidance)
This system keeps you on the right side of the trend. The tradeoff is whipsaws during sideways markets, where the MAs cross back and forth without a clear trend. Adding a trend filter (such as requiring price to be above the 200 SMA) reduces false signals.
MA crossovers work well in trending instruments. For range-bound stocks, they generate losses. Always assess whether the market is trending or ranging before applying this strategy.
Which Should You Use?
There is no universally correct answer. Use the EMA when you need faster signals, like intraday or swing trading with bull flag breakouts. Use the SMA when you want fewer false signals and care more about the bigger picture, like identifying long-term trends.
Many traders use both. A 200-day SMA defines the long-term trend, and a 9-day EMA times short-term entries within that trend. The combination gives you direction from the SMA and timing from the EMA.
Key Takeaways
- SMAs are slower and smoother. EMAs are faster and more responsive.
- The 50 and 200 SMAs define the trend direction for most institutional traders.
- Golden cross (bullish) and death cross (bearish) are major signals but lag.
- Moving averages work best in trending markets and generate whipsaws in ranges.
- Combine moving averages with other tools like RSI for confirmation.