Moving average
The average price over a set number of recent periods, recalculated each bar so it ‘moves’ with the chart. Used to smooth price and judge trend direction.
A moving average takes the closing prices of the last N bars, averages them, and plots the result. As each new bar closes, the oldest one drops out and the newest is added, so the line moves along with price but more smoothly.
The two most common types:
- Simple moving average (SMA): every bar in the window counts equally.
- Exponential moving average (EMA): recent bars carry more weight, so it reacts faster to new prices.
Common lengths include 20, 50, 100 and 200 periods. The 200-day SMA is widely watched as a rough dividing line between long-term uptrends and downtrends.
Example
Illustrative closes for GBP/USD over five days: 1.2700, 1.2720, 1.2690, 1.2750 and 1.2740. The 5-day SMA is the sum (6.3600) divided by 5, or 1.2720. If the next close is 1.2800, the first value drops out and the new 5-day SMA becomes (1.2720 + 1.2690 + 1.2750 + 1.2740 + 1.2800) divided by 5, or 1.2740.
How traders use them
- Trend direction: price above a rising average is a simple definition of an uptrend.
- Crossovers: a short average crossing a long one, such as 50 over 200.
- Dynamic levels: some traders watch how price behaves around a well-known average.
- Building blocks: indicators such as MACD and Bollinger Bands are built from moving averages.
Limits
Moving averages always lag, because they are made of past prices. In a ranging market, crossovers produce a string of false signals. No length is "correct"; settings chosen because they worked on past data often stop working. Our guide to trend following and moving averages covers the trade-offs.
Not investment advice. This is general information and education, written without knowledge of your circumstances. It is not a recommendation to buy or sell any instrument. Past performance is not a reliable indicator of future results. Trading leveraged products carries a high risk of losing money. Risk warning