How to Use Moving Averages Part -I

By | August 12, 2017


The Moving Average is one of the classical and most reliable tool for technical  analysis.A Moving Average is an indicator that shows the average value of a security’s price over a period of time. When calculating a moving average, a mathematical analysis of the security’s average value over a predetermined time period is made. As the security’s price changes, its average price moves up or down. Moving averages can be calculated on any data series including a security’s open, high, low, close, volume, or another indicator. The critical element in a moving average is the number of time periods used in calculating the average. The key is to find a moving average that will be consistently profitable.

There are two popular types of moving averages:

  1. Simple Moving Average (SMA)
  2. Exponential Moving Average (EMA)

The only significant difference between the EMA and SMA is the weight assigned to the most recent data.

  • Simple moving averages apply equal weight to the prices.
  • Exponential moving averages apply more weight to recent prices.

GDX Daily chart is shown below with a 20 Day moving average in red and 50 Day Exponential Moving Average in Blue.

Calculation for SMA

A “Simple” moving average is calculated by adding the security’s price for the most recent “n” time period and then diving by “n”. SMA is lagging moving average.

For Eg. 5-day simple moving average is the five day sum of closing prices divided by five.

Daily Closing Prices: 101,102,103,104,105,106,107

First day of 5-day SMA: (101 + 102 + 103 + 104 + 105) / 5 = 103

Second day of 5-day SMA: (102 + 103 + 104 + 105 + 106) / 5 = 104

Third day of 5-day SMA: (103 + 104 + 105 + 106 + 107) / 5 = 105

In the above example we have shown 5 SMA on daily chart of XOP, Note as SMA is lagging moving average so it do show whipsaw. To avoid whipsaw we use EMA.




Calculation for EMA

“Exponential” moving averages reduce the lag by applying more weight to recent prices. The weighting applied to the most recent price depends on the number of periods in the moving average.

Steps to calculating an exponential moving average:

  1. Calculate the simple moving average.
  2. Calculate the weighting multiplier.
  3. Calculate the exponential moving average.

Lets take an example of how to calculate 5 EMA:

SMA: 5 period sum / 5

Multiplier: (2 / (Time periods + 1) ) = (2 / (5 + 1) ) = 0.33 (33.33%)

EMA: {Close – EMA(previous day)} x multiplier + EMA(previous day).


A 5-period exponential moving average applies an 33.33 % weighting to the most recent price.

Below is an example of a 5-day  “SMA” and “ EMA” for Apple. Simple moving averages are calculated as discussed in above example. The exponential moving average starts with the simple moving average value 449.61 in the first calculation. After the first calculation, the  EMA formulae as discussed above will take effect.

DateClose Price5 SMAMultiplier5 EMA




As EMA gives more weight to recent price action whipsaws are quiet less. As seen in above example Apple just kept trading above its 5 EMA in the uptrend which started in January 2012.

To be Continued

4 thoughts on “How to Use Moving Averages Part -I

  1. AbdulQader

    Are EMA Periods Changes for Positional & IntraDay Charts?

Leave a Reply