Exponential moving averages

Posted by Scriptaty | 9:37 PM

The exponential moving average (EMA) uses a special algorithm (the “smoothing constant”) that weights price by a percentage factor. There are two versions of the EMA calculation.

Both versions use a smoothing constant to weight the closing price and adjust the previous day’s EMA value.

The constant uses a formula to approximate the value of a SMA:

SC = 2/(n + 1)
where

n = the look-back period for a simple moving average

SC = a smoothing constant between 1 and zero

Therefore, if n = 10:

SC = 2/(10+1) = 2/11 = 0.1818

The first version of the EMA calculation multiplies today’s close by the smoothing constant and yesterday’s EMA by 1 minus the smoothing constant:

(today’s close * 0.1818) + (yesterday’s EMA * 0.8182)

The second approach uses the following formula:

(today’s close - yesterday’s EMA)* 0.1818) + yesterday’s EMA

The formulas show how important today’s close is relative to the previous day’s EMA. If today’s close is above yesterday’s EMA for the first time, the EMA will immediately turn up. If today’s close is less than yesterday’s EMA, the average will immediately turn down.

There is no lag between today’s close and the direction of the EMA. During trading ranges, however, the EMA will flip back and forth.

It compares a 10-day EMA to the 10-day SMA. At points A and D the EMA reverses direction once the Euro crosses above or below it. It is a little less noticeable, but at points B and C, the EMA turns up because price closes above it.

The EMA is best applied to markets that are prone to spike reversals. A market that moves into a lengthy trading range will be constantly crisscrossing this average.

0 comments