Moving averages: SMA vs EMA, and how to use them
A moving average is the average price of the last few candles, updated with every new candle. It smooths out daily noise to show the direction of the trend, and it is the most basic and most widely used tool in technical analysis.
Simple moving average (SMA)
The arithmetic mean of the last N closes: SMA = (C₁ + C₂ + … + Cₙ) / N. Every candle carries the same weight.
Example: if the last five closes are 10, 11, 12, 13 and 14, the 5-day SMA = 60 / 5 = 12. If the next close jumps to 20, the oldest value (10) drops out and the new SMA = (11 + 12 + 13 + 14 + 20) / 5 = 14.0.
Exponential moving average (EMA)
The EMA gives more weight to recent prices: with α = 2 / (N + 1), EMA = EMAprevious + α × (Close − EMAprevious).
Same example: for a 5-day EMA, α = 2 / 6 = 1/3. With a previous EMA of 12 and a close of 20, the new EMA = 12 + (20 − 12) / 3 = 14.67. To the same jump the SMA responds with 14.0 and the EMA with 14.67: the EMA moves toward the new price faster.
SMA or EMA?
| SMA | EMA | |
|---|---|---|
| Speed of reaction | Slower | Faster |
| False signals | Fewer | More |
| Best suited to | Long-term trend, support and resistance | Short-term trading, catching turns early |
Neither is simply “better”. Long-term investors tend to prefer the SMA, short-term traders the EMA.
Which periods are used?
- 20-day: the short-term trend, roughly one month of trading days.
- 50-day: the medium-term trend.
- 200-day: the long-term trend. For many investors, price above the 200-day average means the stock is in a long-term uptrend.
How to read moving averages
- Where price is: above the average, the trend is considered up; below it, down.
- The slope: a rising average shows an uptrend; a flattening one, a trend losing strength.
- Crossovers: a short average crossing above a long one is a bullish signal, crossing below a bearish one. The 50-day crossing above the 200-day is the golden cross; crossing below, the death cross.
- Dynamic support and resistance: in an uptrend, pullbacks often stop at the average and turn back up.
Limitations
Moving averages are calculated from past prices, so they always lag; they show a trend once it has started. In sideways markets with no clear direction, price keeps crossing the average back and forth and produces many false signals. They work better alongside a momentum indicator such as the RSI and the company's financials.
Moving averages in Gonofin
- MA (simple moving average): default periods 5, 10, 30 and 60; you can draw up to eight periods at once and pick any period up to 500 (for example 200).
- EMA (exponential moving average): default periods 6, 12 and 20.
- SMA (weighted average): the “SMA” indicator in Gonofin is not the simple average above, but a smoothed average with a period and a weight parameter. Use MA for a simple average.
- You can set an alert on price crossing an average, for example “price crosses above MA200”. See price and indicator alerts.
- The MOST indicator is also built on a moving average (ExMov), with a trailing stop on top.
This guide is for information only and is not investment advice. No indicator guarantees future price movements.
Last updated: