Moving AverageMA
A moving average is the average price over a fixed number of recent periods, recalculated each period to smooth out short-term noise.
A moving average turns a jagged price chart into a smooth line, so the direction underneath the noise is easier to see. It is probably the most widely used indicator in trading: the 50-day and 200-day averages are quoted in market news, and many other indicators, including MACD and Bollinger Bands, are built from moving averages. This entry shows how to calculate the two main types, how traders use them, and why every moving average is always late.
- Category
- Indicators and Tools
- Reading time
- 7 min
- Also called
- Simple moving average, Exponential moving average, 200-day moving average
- Updated
A moving average in plain words
Take the last 10 closing prices, add them up and divide by 10. That is a 10-period simple moving average. Tomorrow, drop the oldest price, add the newest, and calculate again. Plotted bar by bar, the averages form a line that “moves” along the chart.1
Because it averages many prices, the line is smoother than the price itself — and it always reacts after the price has moved. The longer the period, the smoother the line and the bigger that delay.1
How to calculate and use a moving average, step by step
Choose the period
Short periods (10–20) follow price closely; long periods (100–200) show the big picture. A 200-bar average is a common proxy for the long-term trend and a 50-bar for the intermediate trend.1
Choose the type
A simple moving average (SMA) weights every price equally. An exponential moving average (EMA) gives more weight to recent prices, so it follows price more closely and turns sooner.2
Read the slope
A rising average suggests an uptrend; a falling one a downtrend.1 A flat, tangled average usually means a sideways market.
Watch price relative to the average
Price holding above a rising average is typical of an uptrend. In trends, a rising average often acts as support and a falling one as resistance.2
Use crossovers with care
A short average crossing above a long one is a common buy signal, and crossing below a sell signal.1 The 50-day crossing the 200-day is called a golden cross (up) or a death cross (down).
Accept the lag
Moving averages are not designed to catch exact tops and bottoms; they help you trade in the direction of a trend, with a delay at entries and exits.2
Worked examples
Example 1 — Calculating a 5-day SMA
SMAA stock’s last five closes are $20, $21, $22, $21 and $23. The next day it closes at $24.
| SMA today | ($20 + $21 + $22 + $21 + $23) ÷ 5 = $21.40 |
| Tomorrow: drop $20, add $24 | ($21 + $22 + $21 + $23 + $24) ÷ 5 = $22.20 |
| Change in the average | +$0.80 |
The price rose $1 on the day, but the average rose only $0.80 — the new price is diluted by the four older ones. That is the smoothing, and the lag.
Example 2 — The same day as a 5-day EMA
EMAFor a 5-period EMA the weight on the newest price is 2 ÷ (5 + 1) = 0.333. Yesterday’s EMA was $21.40; today’s close is $24.
| Formula | EMA = previous EMA + k × (price − previous EMA) |
| Calculation | $21.40 + 0.333 × ($24 − $21.40) |
| EMA today | ≈ $22.27 |
The EMA moved to $22.27, slightly more than the SMA’s $22.20, because it puts more weight on the newest price.2 The difference grows when prices move fast.
Example 3 — A crossover that came too late
LagA stock rises from $50 to $70, and the 10-day SMA crosses above the 30-day SMA when the price is already $63. The rally peaks at $71, then falls back; the averages cross down at $62.
| Bought on the up-cross | $63 |
| Sold on the down-cross | $62 |
| Result per share | −$1 on a $20 move |
Both signals were “correct”, yet the lag consumed the whole move. Crossovers work best in long, strong trends and lose money in choppy markets.
A fast and a slow moving average
Simple vs. exponential moving average
How traders use moving averages
Trend filter
Only buying when price is above a rising long-term average keeps you on the side of the main trend. See Trend.
Dynamic support and resistance
In trends, pullbacks often pause near a rising average, which gives a reference for entries and stops. See Support and Resistance.
Crossover systems
Two averages crossing gives simple, rule-based entries and exits — useful in trends, costly in ranges.
Building blocks
Many indicators are made from moving averages, including MACD and Bollinger Bands.
Advantages and disadvantages
Advantages
- Simple to calculate and available on every platform.
- Makes the trend direction easy to see.
- Objective: everyone using the same settings sees the same line.
Disadvantages
- Always lags price; signals arrive after the move has started.
- Produces repeated false signals in sideways markets.
- No period is “correct”; results depend heavily on the setting.
- Popular levels like the 200-day can attract crowded reactions that do not hold.
Going deeper
Read as far as you need. Each level builds on the one before it.
Start with one or two averages
Beginner
A single 50- or 200-day average on a daily chart answers the first question: is the long-term trend up or down? Adding many averages rarely adds information.
Weighted, smoothed and ribbons
Intermediate
A weighted moving average (WMA) gives linearly more weight to recent prices; a smoothed moving average applies very slow, Wilder-style smoothing. A moving average ribbon draws many averages of different lengths together: when they fan out in order the trend is strong, and when they tangle the market is ranging.
The EMA formula and its memory
Advanced
An EMA is calculated as previous EMA + k × (price − previous EMA), where k is usually 2 ÷ (n + 1). The first value is commonly seeded with an SMA.2 Because each value includes the previous one, an EMA in theory remembers every past price, with older prices fading towards zero weight.
Two platforms can show slightly different EMAs for the same settings if they start the calculation at different points in the data.
Common mistakes
Expecting exact tops and bottoms
Moving averages confirm trends after they start; they do not predict turning points.
Trading crossovers in a range
When averages are flat and tangled, crossovers whipsaw back and forth and rack up losses.
Optimising the period to past data
The “perfect” setting on last year’s chart is usually luck. See Overfitting.
Treating the line as a hard level
Price often pierces an average before respecting it. Treat it as a zone.
Check your understanding
Test yourself before moving on. Each answer comes with an explanation.
Key points to remember
- A moving average is the average price over the last N periods, recalculated each period.
- SMAs weight all prices equally; EMAs weight recent prices more and turn sooner.
- Longer periods are smoother but lag more.
- Slope and price position show the trend; crossovers generate signals.
- Moving averages work in trends and whipsaw in ranges.
Frequently asked questions
What is the best moving average?
What are a golden cross and a death cross?
Should I use the closing price?
Further learning
- MACD
An indicator built from two exponential moving averages.
- Trend
What moving averages are trying to show.
- Support and Resistance
Why averages sometimes act as dynamic levels.
- Relative Strength Index
A momentum indicator often used alongside a trend average.
Sources
This article is written in our own words. The sources below support the specific facts, rules and figures marked with a number in the text. Links open the original publisher’s page.
- Fidelity. Simple Moving Average (SMA) (opens in a new tab) Checked .
- Fidelity. Exponential Moving Average (EMA) (opens in a new tab) Checked .
Read more elsewhere
- Trading Metrics (our sister site): Simple Moving Average (SMA) (opens in a new tab)
- Investopedia: Moving Average (opens in a new tab)
Educational content, not financial advice. Examples use hypothetical prices and simplified costs; actual fees, margin rules and regulations vary by broker, market and country. Trading Metrics is our sister site, under the same ownership; we are not affiliated with any other publisher linked above. Last reviewed . Report an error or request a source credit.