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:
| Period | Typical Use |
|---|---|
| 9-day | Very short-term momentum, earnings plays |
| 20-day | Swing trade pullback entries, trend health |
| 50-day | Intermediate trend structure, institutional reference |
| 200-day | Long-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
| Aspect | Detail |
|---|---|
| Formula | Sum of last n closes ÷ n |
| Common Periods | 9, 20, 50, 200 (daily); 9, 21 EMA preferred intraday |
| Good Signal | Price pulling back to rising SMA in established uptrend |
| Warning Signs | SMA 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.