A moving average is a running average of past prices. It turns a noisy price series into a single smooth line that updates as new data arrives, helping you see the prevailing trend.
Traders plot moving averages on charts to judge direction, highlight potential support or resistance and create rules for entries and exits. The idea is simple: look back over a fixed window, average those prices, then roll the window forward one period at a time.
What a moving average measures and how to read it
A moving average tracks the typical price over your chosen lookback, such as 20 days on a daily chart or 50 bars on a one hour chart. If price sits above a rising average, momentum is generally up. If price is below a falling average, momentum is generally down. Flat or whipsawing averages usually signal a range.
Two common ways to read the line:
- Direction and slope: rising suggests buyers are in control, falling suggests sellers are.
- Interaction with price: pullbacks toward the average can act as dynamic support in an uptrend or resistance in a downtrend. That is an observation, not a guarantee.
Because it only uses past prices, a moving average lags. It will never catch the exact turning point. That trade off is the price of smoothing.
Common types: SMA, EMA and others
All moving averages blend past prices. They differ in how they weigh each observation.
- Simple moving average (SMA): each period in the window gets equal weight. A 10 day SMA is the sum of the last ten closing prices divided by ten. It is easy to understand and widely used.
- Exponential moving average (EMA): recent prices carry more weight. The EMA uses a smoothing factor, often written as 2 divided by (number of periods plus 1). This makes the line react faster to new information than an SMA of the same length.
- Weighted moving average (WMA): assigns explicit weights, typically highest to the newest data and tapering down. It sits between SMA and EMA in spirit, though implementations vary.
Many indicators are built from moving averages. The best known is MACD, which compares two EMAs to gauge momentum and potential trend shifts.
Choosing a period and timeframe
The lookback length controls sensitivity. Short windows hug price and flip more often. Long windows smooth more but react slowly.
- Short term: 5 to 20 periods. Useful for swing tactics and quick trend checks. Expect more false signals in choppy markets.
- Medium term: 20 to 60 periods. A common compromise for trend following on daily charts.
- Long term: 100 to 200 periods. Favoured for big picture trend filters and portfolio screens.
Timeframe matters just as much. A 20 period average on a five minute chart reads intraday flow. The same 20 on a daily chart reflects roughly a month of trading. You can also compute moving averages on highs, lows or typical price rather than closes, but closes are the default for many analysts.
There is no universal best setting. It depends on your market, volatility, costs and decision speed. Backtesting and forward observation help you understand how a chosen average behaves with your instrument.
Typical uses in trading and analysis
Moving averages show up in many playbooks. Common applications include:
- Trend filter: only take long signals if price is above a rising average and shorts if below a falling one. This tries to align trades with the broader move.
- Crossovers: a short average crossing above a long average can be treated as a bullish shift. The reverse can be treated as bearish. Some traders nickname these golden and death crosses for long lookbacks, such as 50 over 200.
- Dynamic levels: in grinding trends, pullbacks toward a 20 or 50 period average can mark areas where participants step in. It is a guide, not a promise.
- Signal building: many systems mix an EMA for speed with an SMA for stability, or combine price relative to the average with other indicators to reduce false positives.
On most charting platforms, including MetaTrader, you can choose type, period and source price, then layer several moving averages on the same chart. Names, defaults and calculation details can vary by provider.
Example: a 5 day SMA in action
Imagine a stock with the following recent closes. The 5 day SMA starts once you have five data points, then updates each day by dropping the oldest close and adding the newest.
| Day | Close | 5 day SMA | How it is computed |
|---|---|---|---|
| 1 | 98 | n/a | Fewer than 5 observations yet |
| 2 | 100 | n/a | Fewer than 5 observations yet |
| 3 | 101 | n/a | Fewer than 5 observations yet |
| 4 | 102 | n/a | Fewer than 5 observations yet |
| 5 | 103 | 100.8 | (98+100+101+102+103) divided by 5 |
| 6 | 104 | 102.0 | (100+101+102+103+104) divided by 5 |
| 7 | 102 | 102.4 | (101+102+103+104+102) divided by 5 |
Notice how the average increases steadily as higher closes replace lower ones, then eases when a softer close enters the window. An EMA with the same five period length would track more tightly to the last few closes, so it would rise faster on day 6 and dip a bit more on day 7.
Where you encounter moving averages
You will see moving averages across equities, forex, commodities and crypto. They appear in analyst notes, scanner filters and risk rules. Many portfolio dashboards show a long term average to flag drawdown controls, for example reducing exposure if a broad index sits below a 200 day SMA.
Every moving average needs clean historical prices. In practice this comes from your broker or exchange feed, or from consolidated market data. Be mindful of session gaps, corporate actions and contract rolls, since they can affect continuity and the line you see.
Limits and common pitfalls
Moving averages are popular because they are simple and visual, but they have weaknesses.
- Lag: by construction, they follow price. Fast reversals will show up late, and signals can miss the best part of a move.
- Whipsaw: in sideways markets, crossovers and price flips around the average can fire a string of losing trades.
- Parameter bias: it is easy to cherry pick lengths that fit the past. What worked in one regime may struggle in another.
- One dimensional: a moving average ignores volume, news and volatility. Many traders add filters or combine tools to build a fuller view.
None of this makes moving averages useless. It just means you should treat them as context and rules of thumb rather than oracles. Test your settings, understand how costs and slippage affect results and keep an eye on the regime your market is in.