A moving average (MA) is a calculation that takes the average price of an asset over a fixed number of recent periods, such as the last 20 days, and updates it as each new period is added and the oldest is dropped. Plotted on a chart, it produces a smooth line that filters out short-term noise and shows the general direction of prices. Moving averages are among the oldest and most widely used tools in technical analysis and underlie many other indicators.
The main types are the simple moving average (SMA), which weights each period equally, and the exponential moving average (EMA), which gives more weight to recent prices. Traders use moving averages on shares, currencies, commodities and crypto to judge trends, spot possible support and resistance levels and generate signals, while economists and businesses use the same technique to smooth data such as sales or inflation figures.
Moving average in plain terms
Imagine tracking the temperature each day. Day-to-day readings jump around, so it is hard to tell whether the season is warming up. If instead you note the average of the last seven days, recalculating every morning, the line moves more calmly and the underlying direction becomes clear. That rolling average is a moving average.
Applied to prices, the line shows whether an asset has generally been rising or falling, ignoring individual jumpy days. A longer window, such as 200 days, gives a slow, steady line that reflects the big picture; a shorter window, such as 10 days, follows prices more closely but reacts to more noise.
Formula and example
A simple moving average over periods is:
- is the simple moving average over periods.
- to are the closing prices of the most recent periods.
- is the number of periods in the window.
For example, if a coin closes at 100, 102, 101, 105 and 107 over five days, the five-day SMA is (100 + 102 + 101 + 105 + 107) ÷ 5 = 515 ÷ 5 = 103. If the next day closes at 110, the oldest price (100) drops out and the new SMA is (102 + 101 + 105 + 107 + 110) ÷ 5 = 525 ÷ 5 = 105.
An exponential moving average updates by blending the latest price with the previous EMA, using a smoothing factor , so recent prices count for more. A weighted moving average assigns fixed, declining weights to older prices.
How traders use moving averages
- Trend direction. Price above a rising moving average is read as an uptrend; price below a falling one as a downtrend. The 50-day and 200-day averages are widely watched by stock and crypto traders.
- Crossovers. When a shorter average crosses above a longer one, traders call it a bullish signal; the 50-day crossing above the 200-day is known as a golden cross, and the reverse as a death cross.
- Support and resistance. In trending markets, prices often pull back to a widely followed average before resuming their move, partly because many traders act at those levels.
- Building blocks for other indicators. MACD, Bollinger Bands and the Klinger Oscillator all rely on moving averages.
- Automated strategies. Trend-following rules based on moving averages are common in crypto trading bots and in systematic funds.
Choosing a type and length
| Type | Weighting | Typical use |
|---|---|---|
| Simple (SMA) | Equal weight to every period | Long-term trend lines, such as the 200-day average |
| Exponential (EMA) | More weight to recent prices, declining smoothly | Shorter-term signals and indicators such as MACD |
| Weighted (WMA) | Fixed, linearly declining weights | Traders who want faster response than an SMA |
Shorter windows react faster but produce more false signals; longer windows are steadier but slower. In crypto, which trades every day, a "200-day" average covers 200 calendar days, while in stock markets it covers about 200 trading days, or roughly ten months, a difference worth noting when comparing charts.
Limitations
Moving averages are lagging indicators: they are built from past prices, so they confirm trends after they have begun and turn only after prices have already moved. In sideways markets, prices cross back and forth over the average, producing repeated false signals, sometimes called whipsaws or a fakeout. The choice of length is arbitrary, and a setting that worked well on past data may not work in future. Moving averages are therefore usually combined with other tools, such as the Relative Strength Index or volume measures like the Money Flow Index, and with a wider trend analysis and clear risk management.