Moving Average Exponential
Indicator Type: Overlay
An exponential moving average (MAEXP), sometimes also called an exponentially weighted moving average, applies weighting factors which decrease exponentially.
The weighting for each day decreases by a factor, or percentage, on the one before it.
Interactive Chart users have the option of identifying what data point to calculate the Moving Average from: the Open, High, Low, or Close. You also can identify a "shift" parameter.

Parameters
- Period (20) - the number of bars, or interval, used to calculate the moving average.
- Source (Close) - Interactive Charts only. The data point on which to calculate the Moving Average. Valid options are Open, High, Low, Close, HL/2, HLC/3, OHLC/4, HLCC/4
- Offset (0) - the number of bars to displace the moving average.
Computation
There are two ways to express the decrease, both result in a smoothing factor.
First 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 EMAyesterday each time results in the following power series, showing how the weighting factor on each price p1, p2, 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 N-day 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 has an equal weight in the computation of the average. Also, in a Simple Moving Average, the oldest price data is 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 is never removed, but they have only a minimal impact on the Moving Average.
The main use of this study is its smoothing function. In this way, the Moving Average removes short-term 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 period.
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.