On this page
SMA: The Simple Moving Average Trend Line
The SMA simple moving average is the most basic smoothing tool in technical analysis. It takes the last N closing prices, adds them together, divides by N, and prints the result as a line that updates with every new bar.
Key Takeaways
- SMA simple moving average is the arithmetic mean of the last N closing prices, replotted as each new bar closes.
- Every observation inside the window carries equal weight, which makes the line easy to compute but slow to react.
- The most common mistake is reading a short SMA cross of price as a signal in a sideways market.
- Long SMAs (50, 100, 200) are widely used as trend filters; short ones (5, 10, 20) act as dynamic support and resistance.
Key Takeaways
- SMA simple moving average is the arithmetic mean of the last N closing prices, replotted as each new bar closes.
- Every observation inside the window carries equal weight, which makes the line easy to compute but slow to react.
- The most common mistake is reading a short SMA cross of price as a signal in a sideways market.
- Long SMAs (50, 100, 200) are widely used as trend filters; short ones (5, 10, 20) act as dynamic support and resistance.
What It Is
A simple moving average sums the last N closing prices and divides by N. As each new bar closes, the oldest price drops out of the window and the newest enters. The line that results follows price at a lag determined by the window length.
The SMA is the reference moving average. Every other variant in this family (EMA, WMA, HMA, KAMA) was invented to fix a specific complaint about how the SMA behaves. Knowing the simple version well makes the rest easier to understand.
The Intuition
Daily closes are noisy. A stock can gap up on a rumor, drift sideways, then close down on a late headline, all without changing its underlying trend. Averaging the last 20 or 50 closes filters that jitter and produces a cleaner view of direction.
The tradeoff is lag. A longer window gives a smoother line that reacts late when the trend actually changes. A shorter window turns faster but admits more noise. Choosing a length is a choice about how much lag you accept in exchange for less whipsaw.
How It Works
The formula is the textbook arithmetic mean of the last N closes:
SMA = (P1 + P2 + ... + PN) / N
Every price gets the same weight, 1/N. For a 20-day SMA, each daily close contributes exactly 5 percent to the value. A close from 19 sessions ago pulls on today's average just as hard as yesterday's print.
That equal weighting is both the feature and the flaw. It is easy to reason about and easy to compute. It also means a single stale observation deep in the window influences the line until it falls out. When that old print finally drops, the SMA can jump even if nothing happened today, an effect traders call the "drop-off bias."
Standard windows by horizon:
- 200-day SMA: long-term trend filter widely used by portfolio managers and macro desks.
- 50-day SMA: medium-term trend, used in golden-cross and death-cross definitions with the 200.
- 20-day SMA: short-term trend and the centerline of standard Bollinger Bands.
- 10-day and 5-day SMA: very short windows, mostly used for entry timing.
Worked Example
Take five daily closes: 100, 102, 104, 103, 110. With N = 5:
SMA = (100 + 102 + 104 + 103 + 110) / 5
= 519 / 5
= 103.8
Now roll the window one day forward. The new sequence is 102, 104, 103, 110, 108. The 100 drops out and 108 enters:
SMA = (102 + 104 + 103 + 110 + 108) / 5
= 527 / 5
= 105.4
The SMA moved from 103.8 to 105.4, an increase of 1.6 even though the most recent close fell from 110 to 108. The jump came from dropping the old 100, not from new strength in price. That is the drop-off bias in action.
Common Mistakes
-
Trading every cross of price and SMA. In sideways markets, price pokes above and below a short SMA constantly. The cross is not a signal by itself. Most practitioners pair it with a volatility filter, a longer-term trend filter, or a second confirming indicator.
-
Overfitting the length. Searching from N = 5 to N = 200 for the period with the best historical return is curve-fitting. The backtest looks great and live performance does not match. Tie the length to your trading timeframe instead.
-
Mistaking lag for malfunction. An SMA always trails price. That is the definition of the tool, not a defect. If the line is crossing up and down every few bars, the window is too short, not broken.
-
Mixing input prices silently. SMAs can be built on closes, highs, lows, medians, or typical prices. Switching the input across strategies produces results that are not comparable.
-
Ignoring drop-off bias. Sudden moves in an SMA can be caused by an old price leaving the window rather than by new information. Check the bar that just dropped out before reacting.
Frequently Asked Questions
What is SMA simple moving average in simple terms? The SMA simple moving average is the average of the last N closing prices. It smooths price into a line that updates every bar.
How does SMA affect investment decisions? Long SMAs (50, 100, 200) act as trend filters: many investors only buy when price sits above the 200-day SMA. Short SMAs (10, 20) are used for entry timing and as dynamic support or resistance.
What is a real-world example of an SMA? The 200-day SMA on the S&P 500 is one of the most watched lines in markets. Crosses of the index above or below it are quoted in headlines and used by trend-following funds.
How can investors use the SMA effectively? Match the window length to your horizon and pair the SMA with at least one confirming filter such as volatility or a longer trend. Treat single crosses as alerts, not orders.
How is SMA different from EMA? SMA weights every price in the window equally. EMA gives more weight to recent prices and lets older ones decay, so it reacts faster but follows price more closely in choppy markets.
Sources
- StockCharts ChartSchool. "Moving Averages - Simple and Exponential." https://chartschool.stockcharts.com/table-of-contents/technical-indicators-and-overlays/technical-overlays/moving-averages-simple-and-exponential
- Britannica Money. "Simple vs. Exponential Moving Averages." https://www.britannica.com/money/simple-vs-exponential-moving-averages
- CME Group Education. "Understanding Moving Averages." https://www.cmegroup.com/education/courses/technical-analysis/understanding-moving-averages
- Investopedia. "Simple Moving Average (SMA)." https://www.investopedia.com/terms/s/sma.asp
Disclaimer
This article is educational content only and is not financial advice. Nothing here is a recommendation to buy, sell, or hold any security. Consult a licensed advisor before making investment decisions.