trend
Simple Moving Average (SMA)
The arithmetic mean of closing prices over N periods. The foundational trend indicator.
What is it?
The Simple Moving Average is the most basic and widely used technical indicator in trading. It calculates the arithmetic mean of an asset's price over a fixed number of periods, treating every period in the lookback window with equal weight. The result is a smoothed line that filters out short-term noise and reveals the underlying trend direction.
When the SMA slopes upward, the average price is rising — buyers have been in control over the lookback period. When it slopes downward, sellers have dominated. When price trades above the SMA, the asset is above its average — generally interpreted as a bullish bias. When price trades below, it's bearish.
The SMA is a lagging indicator. Because it averages historical data, it will always be slower to react to a new trend than the price itself. This lag is the price you pay for smoothness. Longer lookback periods (200-day SMA) lag heavily but identify major trends with high reliability. Shorter periods (10-day or 20-day SMA) react quickly but produce more whipsaws.
In crypto markets, the 200-day SMA on the daily timeframe is widely watched as the dividing line between bull and bear regimes. When Bitcoin trades persistently above the 200-day SMA, institutional desks and trend-following systems treat that as bull market confirmation. When BTC closes decisively below, many systematic strategies switch to defensive postures.
Formula
SMA = (P₁ + P₂ + ... + Pₙ) / N
How it's calculated
The calculation is straightforward: take the closing prices of the last N periods, sum them, and divide by N.
For a 20-period SMA on the daily chart, you sum the last 20 daily closes and divide by 20. As each new day's close arrives, the oldest close drops out of the window and the newest one enters — the "moving" part of moving average.
Most charting platforms calculate the SMA on closing prices by default. Some traders prefer the typical price (high + low + close) / 3, the median price (high + low) / 2, or even open prices. The choice depends on what signal you're trying to extract: closes carry the most decision-weight in financial markets because they represent end-of-period consensus.
For crypto, which trades 24/7 without session breaks, "close" is whatever the bar's close is on your selected timeframe. A 4-hour SMA uses the closes of 4-hour bars; a daily SMA uses daily closes.
When to use it
**Trend identification.** The slope and direction of the SMA tells you the dominant trend. A rising 50-period SMA confirms an uptrend; a falling one confirms a downtrend; a flat SMA suggests a sideways range.
**Dynamic support and resistance.** In strong trends, price often pulls back to the SMA and bounces. The 50-day and 200-day SMAs are particularly important — many institutional algorithms place orders near these levels, making them self-fulfilling support/resistance zones.
**Crossover signals.** When a faster SMA crosses above a slower SMA (e.g., 50-day crossing above 200-day — the "Golden Cross"), it signals momentum has shifted bullish. The reverse ("Death Cross") signals bearish momentum. These signals are slow but reliable for long-term trend changes.
**Trend filtering for entries.** Many traders only take long signals when price is above a key SMA, and short signals when below. This single filter dramatically improves the win rate of mean-reversion strategies by keeping you on the right side of the larger trend.
In crypto specifically: the 21-day, 50-day, and 200-day SMAs are the most-watched. Bitcoin holding its 200-day SMA has historically marked persistent bull conditions; losing it has marked extended bear phases.
Common parameters
period = 20
Number of periods averaged. Shorter = more responsive, more whipsaws. Longer = smoother, more lag.
source = close
Which price to average. Close is standard; some use typical price (HLC/3) for slightly smoother results.
Pitfalls
**Lag in fast markets.** SMA is mathematically incapable of reacting faster than the lookback period. If a major news event flips the market, the SMA won't catch up until enough new bars enter the window. By then, much of the move is over.
**Equal weighting issue.** The SMA treats the closing price from 20 days ago as equally important as yesterday's close. For some markets and traders, this is a feature (it filters out short-term noise). For others, it's a flaw (recent price action carries more decision-weight than old prints). Consider EMA or WMA if recency matters.
**Whipsaws in sideways markets.** When the market is ranging, the SMA repeatedly flattens and price crosses it back and forth, producing false signals. SMA crossovers are unreliable in choppy conditions. Add a trend strength filter (ADX) or only trade SMA signals when volatility is expanding.
**Period selection is curve-fittable.** It's easy to backtest a strategy and find that a 47-period SMA "would have" produced great results on historical data — but 47 is meaningless. Stick to widely-used periods (20, 50, 100, 200) that other market participants are watching.
Pairs well with
EMARSIMACDADXBollinger Bands
Ready to test a strategy using Simple Moving Average (SMA)?
Build a strategy →