Simple, Exponential and Weighted Moving Averages

Day Trading Uses and Applications of Moving Averages

example of sma, ema, and wma on price chart
••• SMA, EMA, and WMA on One-Minute Chart.

Moving averages are a technical indicator that shows how the price has moved, on average, over a certain period of time. Moving averages are used to help highlight trends, spot trend reversals and provide trade signals. There are several different types of moving averages, but they all create a single smooth line that can help show which direction the price is moving.

Simple Moving Average Calculation

The simple moving average (SMA) is an average of the last n prices, where n is the number of periods you want the average of.

  • (P1 + P2 + P3 + P4 + ... + Pn) / n

A four-period SMA with prices of 1.2640, 1.2641, 1.2642, and 1.2641 gives a moving average of 1.2641 using the calculation [(1.2640 + 1.2641 + 1.2642 + 1.2641) / 4 = 1.2641].

While knowing how to calculate a simple average is a good skill to have, trading and chart platforms calculate all this for us. Simply select the SMA indicator from the list of charting indicators, apply it to the chart, and adjusting the number of periods used. Adjustments to the indicators are made in the "Settings." On many platforms, the settings are accessed by double-clicking on the indicator.

The advantage of an SMA is that you know exactly what you are getting. The SMA value is the average price for the number of periods in the SMA calculation.

Common SMA values are 8, 20, 50, 100 and 200. For example, if using a 100-period SMA, the current value of the SMA on the chart is the average price over the last 100 periods (price bars). 

This chart shows a 50-period SMA, along with an exponential moving average (EMA) and a weighted moving average (WMA) on a one-minute stock chart. Due to their different calculations, the indicators appear at different price levels on the chart. These other types of averages are discussed next.

Exponential Moving Average Calculation

The EMA is a weighted average of the last n prices, where the weighting decreases exponentially with each previous price/period. In other words, recent prices are given more weight than past prices.

  • [Close - previous EMA] x (2 / n+1) + previous EMA

A four-period EMA with prices of 1.5554, 1.5555, 1.5558, and 1.5560, with the last value being the most recent, gives a current EMA value of 1.5558 using the calculation [(1.5560 - 1.5558) x (2/5) + 1.5558 = 1.55588].

As with the SMA, charting platforms do all the EMA calculations for us. Select the EMA from the indicator list on a charting platform and apply it to the chart. Go into the settings and adjust how many periods the indicator should calculate, for example, 15, 50 or 100 periods.

The EMA adapts quicker to price changes than the SMA. For example, when price reverses direction, the EMA will reverse direction quicker than the SMA. The reason is that the EMA applies more weight to recent prices, and less weight to prices that occurred in the past. 

Weighted Moving Average Calculation

The WMA is a weighted average of the last n prices, where the weighting decreases with each previous price. This is a similar concept to the EMA, but the calculation for the WMA is different.

  • (Price X weighting factor) + (Price previous period X weighting factor-1)...

WMAs can have different weights assigned based on number periods used in the calculation. If there are four prices you want a weighted moving average of, then the most recent weighting could be 4/10, the period before could have a weight of 3/10, the period prior to that could have a weighting of 2/10, and so on. 10 is a randomly picked number, and a weight of 4/10 means the most recent price will account for 40 percent of the value of the WMA. The price three periods ago only accounts of 10 percent of the WMA value.


Assume prices of 90, 89, 88, 89, with the most recent price first:

((90 x (4/10)) + (89 x (3/10)) + (88 x (2/10)) + (89 x (1/10)) = 36 + 26.7 + 17.6 + 8.9 = 89.2

The weighted moving average is more customizable than the SMA and EMA. The most recent price points are usually given more weight, but it could also work the other way, where historical prices are given more weight. 

Moving Average Trading Uses

Moving averages can be used for both analysis and trading signals

For analysis, all the moving averages help highlight the trend. When the price is above its MA it shows that the price is trading higher than it has, on average, over the period being analyzed. That helps confirm an uptrend. When the price is below its MA it shows that the price is trading lower than it has, on average, over the period being analyzed. That helps confirm a downtrend

When the price crosses above its MA it shows the price is getting stronger relative to where it was in the past because the most recent price is now higher than the average. If the price crosses below its MA it shows the price is getting weaker relative to where it was in the past. 

One longer- and one shorter-term MA—for example, 20 and 50 periods—can be added to a chart simultaneously. When the 20 crosses above the 50, it indicates that short-term price momentum is moving to the upside. When the 20-period MA crosses below the 50 it indicates that the short-term price momentum is moving to the downside. 

MAs can also be incorporated with other indicators to provide trade signals. An EMA can provide buy signals when combined with Keltner Channels. A strategy may include buying near the EMA when the trend is up and the price is pulling back from the top of the Keltner Channel.

One type of MA isn't better than other; they just calculate the average price differently. Depending on the strategy being used, one type of MA may work better than another. Try out different MA combinations and see which provides you with the best results.

You may find that for each market you need to adjust your settings slightly. A 50-period SMA may provide great signals on one stock, but doesn't work well on another. Or a 20-period EMA may help isolate the trend on one futures contract, but not another. All the MAs are just tools, interpreting them is up to the trader, because no indicator works well all the time or in all market conditions.