Technical Analysis

SMA

Last Updated
Quick Definition

SMA — SMA is the arithmetic mean of closing prices over a set period, recalculated each bar by adding the newest close and dropping the oldest.

Track SMA with JournalPlus

The Simple Moving Average (SMA) is the arithmetic mean of a security’s closing prices over a defined lookback period, recalculated every bar as the newest close replaces the oldest. Despite its simplicity, SMA underpins the majority of trend-following systems used by retail and institutional traders alike, and the 200-day SMA is arguably the single most-watched line on any daily chart.

Key Takeaways

  • Match the SMA period to your holding time: 20-day for swing trades, 50-day for intermediate trend structure, 200-day for macro regime.
  • A pullback to a rising 20-day SMA in a confirmed uptrend is one of the highest-probability swing entry setups in classical technical analysis.
  • SMA is slower than EMA by design — that lag makes it better for identifying major structural support levels, not for fast intraday signals.

How to Calculate SMA

SMA(n) = (P1 + P2 + ... + Pn) ÷ n

Where P is the closing price for each bar and n is the number of periods. Every new bar, the most recent close is added and the oldest close drops off. A 20-day SMA on AAPL uses exactly the last 20 daily closes — no more, no less. All 20 bars carry identical weight, which is the defining characteristic separating SMA from EMA, where recent bars receive exponentially more weight.

Common periods and their use cases:

PeriodTypical Use
9-dayVery short-term momentum, earnings plays
20-daySwing trade pullback entries, trend health
50-dayIntermediate trend structure, institutional reference
200-dayLong-term regime filter, institutional benchmark

A 20-period SMA on a 5-minute ES futures chart covers only 1 hour 40 minutes of market time. Period selection must match your intended holding period — a 20-period SMA means very different things on a 5-minute chart versus a daily chart.

Quick Reference

AspectDetail
FormulaSum of last n closes ÷ n
Common Periods9, 20, 50, 200 (daily); 9, 21 EMA preferred intraday
Good SignalPrice pulling back to rising SMA in established uptrend
Warning SignsSMA slope flattening or turning down while price is near it

Practical Example

A swing trader monitoring AAPL on the daily chart sees price in a sustained uptrend — it has held above the rising 20-day SMA for six consecutive weeks. AAPL pulls back from $195 to $183, touching the 20-day SMA (currently at $182.50).

With a $30,000 account and a 1% risk rule, the trader allocates $300 of risk to the trade. The stop is placed at $179, just below the 50-day SMA at $180, giving $4 of risk per share.

Position size = $300 ÷ $4 = 75 shares
Capital deployed = 75 × $183 = $13,725 (~46% of account)
Target = $195 (prior high) → $12 gain per share
Reward-to-risk = $12 ÷ $4 = 3:1

The trader tags this entry “20-day SMA pullback” in their journal. After logging 20 similar setups, they can filter by that tag to see actual win rate, average R, and whether this specific setup produces edge — rather than relying on backtested generalizations.

The Simple Moving Average calculates the average closing price over a set number of bars. Traders use the 20-day SMA for swing entry signals, the 50-day for trend structure, and the 200-day as a long-term regime filter for the overall market.

Why SMA Matters

The 200-day SMA is a macro regime indicator. When SPY closed below its 200-day SMA in March 2020, a 34% drawdown followed. When it reclaimed that level in June 2020, it preceded a 100%+ rally over 18 months. Many institutional quant funds exclude stocks below their 200-day SMA from momentum factor portfolios entirely, a practice grounded in the Fama-French momentum literature.

Golden Cross and Death Cross are lagging but meaningful. A Death Cross — 50-day SMA crossing below the 200-day — signals a deteriorating long-term trend. The opposite, a Golden Cross, has historically been associated with stronger 12-month forward returns on SPY versus Death Cross conditions. These signals confirm regime shifts rather than predicting them.

Stan Weinstein’s Stage Analysis uses the 30-week SMA (approximately 150-day) as the primary boundary between accumulation (Stage 1) and uptrend (Stage 2). A stock breaking above a flat 30-week SMA on volume is the classic Stage 2 breakout setup from his widely-read 1988 framework.

SMA ribbons reveal trend strength. Stacking the 10, 20, 50, 100, and 200-day SMAs creates a ribbon. When all five lines are fanned out and sloping in the same direction, trend momentum is strong. When they compress or cross, the trend is losing structure.

How JournalPlus Tracks SMA

JournalPlus lets traders tag entries with setup labels like “20-day SMA pullback” or “50-day SMA bounce” and then filter performance stats by those tags. After accumulating 20 or more tagged trades, the analytics dashboard shows win rate, average R, and profit factor for each specific SMA setup — turning anecdotal pattern recognition into measurable edge.

Common Questions

What is the SMA formula?

SMA(n) = sum of the last n closing prices divided by n. For a 20-day SMA, add the last 20 closing prices and divide by 20. The value updates each bar as the newest close is added and the oldest is dropped.

What is the difference between SMA and EMA?

An SMA weights all periods equally, making it slower and smoother. An EMA front-weights recent bars, so it reacts faster to price changes. SMA is preferred for major structural levels like the 50-day and 200-day; EMA dominates short-term and intraday signals.

What does it mean when a stock is above its 200-day SMA?

A stock trading above its 200-day SMA is broadly considered to be in a long-term uptrend. Institutional quant funds commonly exclude stocks below their 200-day SMA from momentum factor portfolios.

What is a Golden Cross in SMA terms?

A Golden Cross occurs when the 50-day SMA crosses above the 200-day SMA. It is a widely-watched bullish macro signal, though it is lagging by nature and best used as a regime filter rather than a precise entry trigger.

Which SMA period should I use for swing trading?

The 20-day SMA is the most common reference for swing traders on the daily chart. A pullback to a rising 20-day SMA in an established uptrend is a classic entry setup used in Stan Weinstein's Stage Analysis and IBD CANSLIM methodology.

Share this article

Track SMA Automatically

JournalPlus calculates your sma and other key metrics from your trade data. Import trades and get instant insights.

SSL Secure
One-Time Payment
7-Day Money-Back
4.9/5 (1,287 reviews)
Track SMA automatically 7-Day Money-Back
Buy Now - ₹6,599 for Lifetime Buy Now - $159 for Lifetime