Skip to content
Day Trading: An Honest Definition and Survival Guide
TradeOlogy Academy
TrendSMA

Simple Moving Average

The arithmetic mean of closing prices over the lookback period. The simplest possible trend filter.

SPY1D
Loading SPY...

Simple Moving Average on SPY, daily candles. Data via Financial Modeling Prep, cached server-side.

Quick reference

Formula
Sum the last N closes, divide by N. Each new bar drops the oldest and adds the newest.
Default settings
20 for short-term, 50 for swing, 200 for long-term. The 200-day SMA is the line institutions watch.
Best for
A binary trend filter: price above the 200-SMA = long bias only, below = short or stand aside.
Signal
Crossovers (price crosses SMA, or fast SMA crosses slow SMA). Most famous: the 50/200 golden cross and death cross.
Common mistake
Equal weighting means a six-week-old price affects the line as much as today's. SMAs lag visibly in trending markets. Use EMA when you need faster response.

The Simple Moving Average is the most basic indicator in technical analysis and the one almost every other indicator is built on top of. Bollinger Bands use it. Standard deviation reads from it. Many momentum oscillators reference it. Despite its simplicity it is also the indicator most often cited by people who do not actually trade with it.

The SMA is a useful tool with specific use cases and specific failure modes. The most-quoted use ("buy when price crosses above the 50-SMA") is almost never how successful traders actually use it. The honest version is more boring and more useful: SMA is a trend filter, not a trade trigger.

What the SMA actually measures

The SMA answers one question: what has the average closing price been over the last N bars?

That is it. The line you see on the chart is the running mean of the last N closes, plotted at each new bar. There is no momentum calculation, no volatility weighting, no acceleration term. Each of the N closes contributes exactly 1/N of the average.

This equal weighting is both the SMA's strength and its weakness. The strength: it is robust to single-bar shocks. A spike-and-recovery on one bar barely moves the line. The weakness: it is slow to react to genuine regime changes, because a six-week-old price still affects the calculation.

The 200-day SMA in particular is a coordination point. Hundreds of millions of dollars in systematic capital uses it as a position filter. Trend-following funds buy above it and sell below it. Macro desks compute portfolio risk against it. When a major index crosses its 200-day SMA, every algorithm watching the same line reacts roughly simultaneously - which is why those crosses tend to produce real market reactions.

The formula

SMA = (Close_1 + Close_2 + ... + Close_N) / N

Sum the last N closing prices, divide by N. Each new bar drops the oldest close from the calculation and adds the newest. The mean shifts one step forward in time.

That is the entire formula. There is no smoothing constant, no weighting function, no recursive update term. The simplicity is the point.

A worked example

Take a 5-period SMA. The last 5 closes are:

50, 52, 51, 53, 54

The SMA reads:

SMA = (50 + 52 + 51 + 53 + 54) / 5 = 260 / 5 = 52.00

A new bar prints with a close of 56. The window slides forward: drop the 50, add the 56:

SMA = (52 + 51 + 53 + 54 + 56) / 5 = 266 / 5 = 53.20

The SMA stepped up from 52.00 to 53.20. A 4-point jump in the most recent close moved the average by 1.20 - exactly 1/5 of the new contribution, which is what the equal-weighting math produces.

You can do this in your head for any N. The SMA will lag price by roughly N/2 bars in a trending market. That lag is the cost of the smoothing.

How traders actually use the SMA

Three use cases generate consistent edge. The fourth (crossover trading) does not, despite being the most-taught.

1. Trend filter

The cleanest SMA application: take long signals only when price is above the SMA; take short signals only when price is below. This is not a trade entry on its own - it is a binary regime gate that filters out trades against the larger trend.

The 200-SMA on the daily chart is the canonical version. Above it = bull regime, long only. Below it = bear regime, short or stand aside. Systematic equity strategies that filter long entries with this single rule have outperformed unfiltered versions across multiple decades of backtest data.

2. Pullback target

In a strong trend, price tends to pull back toward a key SMA before continuing. The 20-SMA serves as a pullback magnet on daily charts; the 50-SMA serves as a deeper pullback line. When price is uptrending and pulls back to its rising 20-SMA, that level often holds.

This is not a guaranteed support, but it is a meaningful confluence level. Combine with horizontal support and a momentum check (RSI not in oversold) for a workable pullback entry.

3. Dynamic support and resistance

In trending markets, price often respects a rising or falling SMA the same way it respects horizontal support and resistance. The 50-day SMA on equity indices has historically acted as durable support in bull markets and resistance in bear markets. This is partly self-fulfilling: traders watching the line place orders near it, which reinforces the level.

The catch: when an SMA breaks decisively (not just a wick through, but a daily close on the other side), the level often flips - prior support becomes resistance. Treat the break as a regime signal, not a chance to "fade the false break."

The trap most retail traders fall into

The default SMA lesson goes: "Buy when the 50-SMA crosses above the 200-SMA (golden cross). Sell when it crosses below (death cross)."

The golden and death crosses are real events, but trading them as entry triggers produces poor expectancy. By the time the 50-SMA has crossed the 200-SMA, the underlying trend has typically been in motion for 30 to 60 days. The cross is the last person at the table to find out.

Backtests across multiple decades and asset classes show that buying on the golden cross and selling on the death cross underperforms simply buying-and-holding by a meaningful margin in equities, and barely matches buy-and-hold in trend-friendly markets like commodities and currencies. The signal is too late and too smoothed to be tradeable on its own.

The other trap: applying the same SMA settings across different timeframes and instruments without thought. A 200-period SMA on the 5-minute chart smooths roughly two trading days of data - it has nothing to do with the "200-day SMA" that institutions watch. Match the lookback to the holding period.

SMA vs other moving averages

vs EMA. The Exponential Moving Average weights recent prices more heavily than older ones. EMA reacts faster to new information; SMA is slower and steadier. For short-term tactical decisions, EMA is preferred. For long-term regime reading (the 200-day), SMA is the convention - and the line everyone else is watching.

vs WMA (Weighted Moving Average). WMA assigns linearly increasing weights to recent bars (the most recent bar gets weight N, the next N-1, and so on). WMA falls between SMA and EMA in responsiveness. Rarely used outside niche systems.

vs Hull Moving Average. Hull MA is an aggressive smoothing technique designed to reduce lag without amplifying noise. It is faster than EMA but more complex to compute. Active traders sometimes use it as a faster trend filter; institutional desks almost never reference it.

Common questions

What is the best SMA period for day trading? There is no universal answer. The 9-EMA gets cited most often because it reacts faster. SMAs for day trading typically use 9, 20, 50. The 200-period on a 5-minute chart approximates a "trend over the last two trading days." Match the lookback to your actual decision horizon.

Is the 200-day SMA still relevant? Yes, more than any other single moving average. It is the line every institutional fund, every long-only mutual fund, and every trend-following system references. The persistence of attention is itself the signal - when price reaches the 200-day, real capital flows respond.

Does SMA work better on stocks, futures, or crypto? The math is identical. The relevance of specific SMAs varies: the 200-day SMA is most-watched on equity indices and large-cap stocks. On crypto and currencies, traders watch the 50-day and 200-day with similar attention but less institutional reaction. On futures, the 50-period on the daily chart is closely watched by managed-futures funds.

Should I use closing prices or other points to calculate SMA? Closes. This is the universal default and what every other trader is computing. Variants exist (typical price = (H + L + C)/3 SMAs, for example) but they are not what the broader market is referencing.

Why does my SMA look different from another platform's? Two reasons. First, some platforms include the current developing bar in the SMA calculation, others wait for the bar to close. Second, missing or extra historical bars (data gaps, dividend adjustments) can shift the line. The math is universal; the data is not always.

Can SMAs predict reversals? No. SMAs describe what has already happened to the average price. They lag the market by design. They identify trend regime well after the trend has begun. Anyone telling you SMAs predict reversals is selling something.

When to use the SMA and when not to

Use the SMA when:

  • You want a slow, stable trend filter on a daily chart (the 200-SMA is the gold standard)
  • You are looking for pullback entries to a key dynamic level (20 or 50-SMA on the daily)
  • You need a coordination line that other traders are also watching (the 50 and 200)

Skip the SMA when:

  • You need fast reaction to new information - use EMA instead
  • You are trading the 1-minute or 5-minute chart where SMA lag overwhelms the signal
  • You are trying to time entries off crossover signals alone - that is what loses money

Related trend indicators