Indicator Help
Exponential Moving Average (EMA)
Not a member? Subscribe now!
An exponential moving average (EMA), sometimes also called an exponentially weighted moving average (EWMA), applies weighting factors which decrease exponentially.
The weighting for each day decreases by a factor, or percentage, on the one before it.
Parameters
 Period (9)  the number of bars, or interval, used to calculate the moving average.
Computation
There are two ways to express the decrease, both result in a smoothing factor α.
Firstly as a percentage so 10% is α=0.1. Or alternately as N periods where
so for instance N=19 is equivalent to the 10%.
In either case the formula for calculating successive days is
Which can also be rewritten as follows, showing how the EMA steps towards the latest price, but only by a proportion of the difference (each time),
Expanding out EMA_{yesterday} each time results in the following power series, showing how the weighting factor on each price p_{1}, p_{2}, etc, decrease exponentially,
In theory this is an infinite sum, but because 1α is less than 1, the terms become smaller and smaller, and can be ignored once small enough. The denominator approaches 1/α, and that value can be used instead of adding up the powers, provided one is using enough terms that the omitted portion is negligible.
The N periods in an Nday EMA only specifies the α factor. It isn't a stopping point for the calculation in the way N is in an SMA or WMA. The first N days in an EMA do represent about 86% of the total weight in the calculation though.
The power formula above gives a starting value for a particular day, after which the successive days formula shown first can be applied.
The question of how far back to go for an initial value depends, in the worst case, on the data. If there are huge p price values in old data then they'll have an effect on the total even if their weighting is very small. If one assumes prices don't vary too wildly then just the weighting can be considered, and work out how much weight is omitted by stopping after say k terms.
This is , which is , ie. a fraction (1 − α)^{k} out of the total weight.
Thus if the aim was to have 99.9% of the weight then many terms should be used.
And what's more it can be shown approaches as N increases, so this simplifies to (roughly)
for this example 99.9% weight.
Interpretation
An Exponential Moving Average is another type of Moving Average. In a Simple Moving Average, the price data have an equal weight in the computation of the average. Also, in a Simple Moving Average, the oldest price data are removed from the Moving Average as a new price is added to the computation. The Exponential Moving Average assigns a weight to the price data as the average is calculated. Thus, the oldest price data in the Exponential Moving Average are never removed, but they have only a minimal impact on the Moving Average.
The main use of this study is its smoothing out function. In this way, the Moving Average removes shortterm fluctuations and leaves to view the prevailing trend.
The Exponential Moving Average can be used as a crossover system. For a crossover system, you may insert three different Exponential Moving Averages. Generally, the lengths for these Moving Averages are short, intermediate, and long term. A commonly used system is 4, 9, and 18 intervals or periods. An interval may be in ticks, minutes, days, weeks, or months; it is a function of the chart type.
Moving Averages work best in trending markets. A buy signal occurs when the short and intermediate term averages cross from below to above the longer term average. Conversely, a sell signal is issued when the short and intermediate term averages cross from above to below the longer term average. You can use the same signals with two Moving Averages, but most market technicians suggest using longer term averages when trading only two Exponential Moving Averages in a crossover system.
Another trading approach is to use the current price concept. If the current price is above the Exponential Moving Averages, you buy. Liquidate that position when the current price crosses below either Moving Average. For a short position, sell when the current price is below the Exponential Moving Average. Liquidate that position when the current price rises above the Exponential Moving Averages.
As you use Exponential Moving Averages, do not confuse them with Simple Moving Averages. An Exponential Moving Average behaves quite differently from a Simple Moving Average. It is a function of the weighting factor or length of the average.
