Moving average is very common when it comes to technical analysis. Currently, there are three common moving averages that can be used on any price chart, the simple moving average (SMA), exponential moving average (EMA) and weighted moving average (WMA). Each moving average offers something different from the others and is most suited in certain situation and timeframes.
Simple Moving Average (SMA)
A simple moving average is the simplest type of all the moving averages. The SMA basically calculates the average price over a specific time period. In order words, each point on the simple moving average indicator represents the average of the previous period length. The SMA is used indicate the trend direction on a chart. A rising simple moving average line indicates an upward price movement or uptrend and a falling simple moving average line indicates a downward price movement or downtrend.The most common period length used on the simple moving average indicator is 200 periods as it calculates the long term average price on the chart. This makes the SMA very useful for long term trends and is greatly used for entry and exit signals.
Using the 20 period SMA
Simple moving average = (P1 + P2 + ... + P20)/N
Where;
Price = P
Number of periods = N
Screenshot of SMA on tradingview
Exponential Moving Average (EMA)
An exponential moving average is another very common type of moving average. An EMA offers more emphasis to the current price based on a recent selected period. This means that the EMA reacts more on the current price movement and puts more importance on the latest prices. The EMA formula makes use of the weight multiplier that is based on the selected periods. This means that the EMA puts more weight on the latest periods than the past periods.
Current EMA = [ CP × (S/1+N)] + Previous EMA × [1 - (S/1 + N)]
Where;
Current price = CP
Smoothing = S
Number of Period = N
Screenshot of EMA on tradingview
Weighted Moving Average (WMA)
The Weighted moving average also known as WMA is a type of moving average indicator that gives more weight on the latest prices than the previous period prices over a specific period of time. This makes the WMA to react more on the current price. Because of the weighted moving average indicator gives more weight on the latest price, it becomes very valuable for short term technical analysis and trading.
Weighted Moving Average = (P1 × N + P2 × (N-1) +... Price N) / ( N × (N+1)/2)
Where;
Price = P
Number of period = N
Screenshot of WMA on tradingview
Differences
Simple moving average gives all prices equal weights. While the exponential moving average gives more emphasis to the current price based on a recent selected period. While weighted moving average gives more weight on the latest prices than the previous period prices over a specific period of time.
Simple moving average lags behind the price. While exponential moving average is more sensitive to the recent price changes. While the weighted moving average is very sensitive to the current price.
Simple moving average works best on longer timeframes and for long term trading. While exponential moving average works best on shorter timeframes and short term trading. While weighted moving average works best on very short timeframes and short term trading or scalping.