Simple Moving Average (SMA)
A foundational trend-filter that smooths out day-to-day noise so traders can see the market’s true direction.
Quick-Scan Panel
Category | TREND |
Primary Inputs | CLOSE price |
Default Parameters | 20-period (short-term); 50- & 200-period for trend analysis |
Strengths | SMOOTHES NOISE, EASY TO CODE, UNIVERSALLY RECOGNISED |
Weaknesses | LAGS PRICE, PRONE TO WHIPSAWS IN CHOPPY MARKETS |
Best Timeframes | DAILY, WEEKLY |
Key Takeaways
- The SMA is the simplest moving-average variant yet still underpins many advanced indicators.
- Crossovers between short- and long-term SMAs flag shifts in trend momentum (e.g. Golden/Death Cross).
- Because the SMA weights all prices equally, it reacts more slowly than EMAs—great for filtering noise but slow to signal reversals.
1. Concept & Origins
The Simple Moving Average takes the arithmetic mean of the last n closing prices to create a continuously updated trend line. First popularised in the early 20th-century commodity pits, its goal is straightforward: remove short-term volatility so traders can judge the prevailing direction of price.
2. Mathematical Intuition
Because each observation has identical weight, the SMA acts like a rolling “centre of gravity” for price. The longer the window, the more inertia the average carries—hence a 200-day SMA barely twitches on daily volatility, while a 20-day SMA hugs price more closely.
3. Indicator Anatomy
Single Line: the SMA itself, representing the mean closing price over the chosen look-back period.
4. Calculation Guide
4.1 Formula
\(\displaystyle\text{SMA}_{t}=\frac{1}{n}\sum_{i=0}^{n-1}P_{t-i}\)
4.2 Worked Example
Assume the last five closing prices are 101, 103, 102, 104, 105. A 5-day SMA on the most recent day is:
- Add prices: 101 + 103 + 102 + 104 + 105 = 515
- Divide by 5: 515 / 5 = 103
The SMA plots at 103 for that day; on the next bar, drop the 101, add the new close, and repeat.
5. How to Read the Signals
5.1 Bullish
- Price crossing above its SMA after a downtrend.
- A shorter SMA (e.g. 50-day) crossing above a longer SMA (e.g. 200-day)—the famed Golden Cross.
5.2 Bearish
- Price closing below its SMA after an uptrend.
- A 50-day SMA crossing below the 200-day SMA—known as a Death Cross.
5.3 Confirmations & Common Pitfalls
- Combine SMA crossovers with volume spikes or momentum indicators (e.g. RSI) to confirm breakouts.
- Beware of whipsaws in sideways markets; longer windows or additional filters can reduce false signals.
6. Chart & Interpretation

The green line shows AAPL’s closing price; yellow and purple lines are the 50- and 200-day SMAs respectively.
Notable signals:
- Golden Cross — Jun 2024: the 50-day SMA rose above the 200-day line, confirming a new medium-term uptrend.
- Death Cross — Mar 2024: just three months earlier the 50-day had slipped below the 200-day SMA, highlighting the prior bearish swing. This whipsaw demonstrates why traders pair SMAs with other confirmation tools.
7. Parameter Sensitivity
Shorter windows (10- to 30-day) track price closely, generating quicker but less reliable signals. Longer windows (100- to 200-day) filter noise but introduce lag. Back-testing multiple lengths—or pairing a fast and slow SMA—helps balance responsiveness against false positives.
8. Practical Uses & Strategy Recipe
Pseudo-code Example:
If the 50-day SMA
crosses above the 200-day SMA
and price is above the 200-day SMA, enter long;
exit when the 50-day SMA crosses back below the 200-day SMA. Evaluate signals on daily closes.
9. Best Practices & Limitations
9.1 Best Practices
- Use SMAs to define the “bias” and layer faster indicators (e.g. MACD) for precise entries.
- Adjust look-back to match asset volatility—tech stocks may need shorter windows than utilities.
- Combine SMA signals with fundamental or macro filters to avoid false positives during earnings shocks.
9.2 Limitations
- All prices are weighted equally, so fresh information may take time to influence the average.
- Lag can cause late exits in sharp reversals, sacrificing profits or deepening losses.
- Performance degrades in sideways regimes; supplemental filters are essential.
10. Related Indicators
- Relative Strength Index (RSI)
- Moving Average Convergence Divergence (MACD)
- Exponential Moving Average (EMA)
- Weighted Moving Average (WMA)
- Hull Moving Average (HMA)
11. Further Reading & References
- Murphy, J. J. Technical Analysis of the Financial Markets
- Welles Wilder, J. New Concepts in Technical Trading Systems
- Internal Tinker Tailored deep dive: “SMA vs EMA – Signal Lag Analysis.”