Moving Averages Calculation Example

Assume a five bar average based on the bar’s close. Assume the past five closes are 45.25, 46.0, 44.5, 45.5, 47.0


 

Simple moving average calculation:


45.25 + 46.0 + 44.5 + 45.5 + 47.0 = 228.25

228.25 / 5 = 45.65



Weighted moving average example:

 

Bar Weight * Price = Weighted Price
1 1 45.25 45.25
2 2 46.00 92.00
3 3 44.50 133.50
4 4 45.50 182.00
5 5 47.00 235.00

Weight Totals:

 

1 + 2 + 3 + 4 + 5 = 15


Weighted Price Totals:

 

45.25 + 92.00 + 133.50 + 182.00 + 235.00 = 687.75


Weighted moving average:

 

687.75 / 15 = 45.85

 


Exponentially smoothed moving average example:


Assume the previous bar’s exponentially smoothed moving average was 45.75 and that you’ve entered 5 for the exponential percentage.


Exponential percentage:


2 / (5 + 1) = .3333


Exponentially smoothed moving average:


(47.0 * .3333) + (45.75 * (1 - .3333)) = 46.1666