Moving Average Indicator
By Chad Smith, Director of Research & Analysis · Updated
On this page
A moving average is a trend indicator that replaces a jagged price series with a smoother line made from the average of recent prices. Each new bar adds the latest price and drops the oldest one, so the average "moves" along the chart. It is the base on which many other tools are built, from MACD to Bollinger Bands.
What it measures
A moving average measures the central tendency of price over a fixed lookback window. It answers a simple question: where has the market been trading, on average, over the last N periods? The slope of the line then tells you which way that average is drifting, which is a practical way to describe a trend.
Because it averages many prices, it filters out small, random moves. That makes the underlying direction easier to see. The cost is delay: the line reacts to a change only after enough new prices have entered the window to shift the average. This is why moving averages are classed as lagging indicators.
"Moving average" is a family name rather than a single formula. The main members differ in how they weight each price inside the window:
- Simple (SMA): every price has equal weight. See the simple moving average.
- Exponential (EMA): recent prices count more, and older prices fade gradually. See the exponential moving average.
- Weighted (WMA): weights fall in a straight line from newest to oldest. See the weighted moving average.
- Hull (HMA): combines weighted averages to cut lag sharply. See the Hull moving average.
The formula
The general idea is an average of the last N prices, with each price multiplied by a weight. The simple version, which most people mean when they say "moving average", gives every price the same weight.
General weighted form:
MA = (w1 × P1 + w2 × P2 + ... + wN × PN) / (w1 + w2 + ... + wN)
Simple moving average (all weights equal to 1):
SMA = (P1 + P2 + ... + PN) / N
where
P1 ... PN = the closing prices of the last N periods
N = the lookback period
w = the weight given to each price
Worked example (illustrative numbers). Suppose the last five closes are 10, 11, 12, 11 and 13. The 5-period simple average is (10 + 11 + 12 + 11 + 13) / 5 = 57 / 5 = 11.4. On the next bar the close is 14. The oldest price, 10, drops out, so the new average is (11 + 12 + 11 + 13 + 14) / 5 = 61 / 5 = 12.2. The line has moved up by 0.8 because the new price was higher than the one it replaced.
Default settings
There is no single default, because the period depends on the job. A few lengths are used so widely that they act as conventions:
| Period | Typical use |
|---|---|
| 9 to 21 | Short-term swings and entry timing |
| 50 | Intermediate trend |
| 100 | Longer intermediate trend |
| 200 | Long-term trend, watched by many market participants |
Most charting software calculates on the close by default. You can usually switch the input to the open, high, low, or a blend such as the typical price. Moving averages are built into MetaTrader, TradingView and practically every other charting platform.
How to read it
Read a moving average through three things: slope, position and spacing.
Slope. A line rising from left to right suggests an uptrend. A falling line suggests a downtrend. A flat line that price keeps crossing suggests a range, where a trend tool adds little.
Position of price. Price holding above the average shows buyers have been in control over that window. Price holding below shows sellers in control. A single close on the other side is not a reversal on its own.
Spacing between averages. When a short average sits well above a long one and the gap is widening, the trend is gaining pace. A narrowing gap shows the move is slowing down, even if it has not reversed.
Common strategies
Crossovers
The best known method uses two averages, one fast and one slow. A fast average crossing above a slow one is a bullish crossover. Crossing below is bearish. The 50 and 200 pairing is widely called the golden cross when bullish and the death cross when bearish. These signals confirm a trend after it has begun; they do not predict it.
Price crossing a single average
Some traders use one average as a filter: only take long trades while price is above it and only short trades while price is below it. This keeps a trader on the side of the larger trend and avoids fighting it.
Dynamic support and resistance
In a steady trend, price often pulls back toward a well-known average and then resumes. Traders watch these areas for a candlestick pattern or another sign that the pullback is ending. The line works as a zone, not an exact price, much like ordinary support and resistance.
Moving average ribbons
Plotting several averages of increasing length creates a ribbon. When the lines fan out in order, the trend is strong. When they twist together, the market is undecided.
Weaknesses
The main weakness is lag. By the time a crossover appears, part of the move has already happened, and on a sharp reversal the signal can come very late.
The second weakness is the sideways market. When price chops in a range, averages flatten and price crosses them again and again. Each cross looks like a signal, and most of them fail. These are often called whipsaws.
Third, the choice of period changes everything. A 10-period line and a 50-period line can give opposite readings on the same chart. There is no correct length, only one that suits a given timeframe and style. Changing the period after the fact to fit past data creates a false sense of reliability.
Finally, a moving average says nothing about the strength of a trend or about volatility. It only shows where the average price is heading.
Indicators it pairs with
Moving averages are usually combined with tools that measure something they cannot:
- ADX to check whether a trend is strong enough for moving average signals to be worth taking.
- RSI to see whether momentum supports the direction of the average.
- ATR to set stop distances around the average based on current volatility.
- MACD, which is itself built from the gap between two exponential averages.
- Envelopes and Keltner Channels, which draw bands around a moving average.
To see how moving averages fit with charts, patterns and other indicators, start with the technical analysis course.
Brokers with strong charting to practice on
Put this into practice on a demo account first, with no money at risk.
- Featured broker
Pepperstone4.7 / 5Visit
IC Markets4.9 / 5Visit
GO Markets4.8 / 5Visit
Frequently asked questions
What does a moving average tell you?
It shows the average price over a chosen number of past periods, drawn as a line. When price holds above a rising average the trend is usually up, and when it holds below a falling average the trend is usually down.
Which moving average is best?
No single type is best for every market. A simple average is steady and easy to read, while an exponential or weighted average reacts faster to new prices at the cost of more false turns.
What is a moving average crossover?
A crossover happens when a faster average crosses a slower one. A fast line crossing above a slow line is read as bullish, and crossing below as bearish, though the signal always arrives after the move has started.
Why do moving averages lag?
Every moving average is built from past prices, so it can only change direction after price has already changed direction. Longer periods smooth more noise but add more delay.
Can a moving average act as support or resistance?
Many traders watch widely followed averages as areas where pullbacks may pause. The line is not a hard barrier, so price often moves through it, especially in sideways markets.