Moving averages are trend overlays that can indicate short, medium, and long-term trends. To calculate the moving average, we take the average price over a certain period of time. A moving average removes a lot of the ‘noise’ on the chart, including short-term volatility and price movements. It can make trends easier to spot.
There are two common ways to calculate moving averages, including simple moving averages and exponential moving averages. Both are considered lagging technical indicators.
A simple moving average (SMA) is just the sum of all closing prices over a particular time period divided by the number of periods. A 5-day SMA, for example, can be calculated by adding the closing prices for each day and dividing the sum by five. Over a longer time period, there’s greater lag. Longer scales smooth our price movements and tend to be less responsive than shorter time scales.
Exponential moving average (EMA), meanwhile, places greater weight on the most recent data points. This can ‘tighten’ the moving average to price movements, making the moving average more responsive to recent price movements.
Exponential moving averages use a weighting multiplier to give the most recent data points greater weight. This weighting multiplier can be calculated using the formula [2 / (Time Period + 1)]. In a 10-day EMA, the weighting given to the most recent price would be [2 / (10 + 1)] = 0.1818, or 18.18%.
There are also current exponential moving averages (EMAs), where you take today’s price x the weighting multiplier + yesterday’s EMA x (1 – weighting multiplier).
You don’t have to memorize these formulas. Charting tools apply these formulas automatically. However, it helps to know where these formulas are coming from.
Typically, the 200-day simple moving average (SMA) chart and the 50-day SMA chart are the two most popular scales for identifying medium to long-term trends. These two charts are also useful for identifying support and resistance levels, bullish and bearish crossovers, and divergences.