A moving average is a smoothing technique used to isolate the trend from short term price fluctuations. There are four basic types of moving averages: simple, auto-regressive, linear weighted, and exponential. The types differ primarily in how they treat older data:
Simple moving averages weigh each of the terms in the average equally.
The linear weighted moving average gives more importance to more recent prices.
Both the simple and the linear weighted moving averages limit the price effect to the number of periods in the average.
The exponential gives more weight to recent prices, but allows all data in the window to influence the average. Instead of a number of periods, the exponential uses a smoothing factor which can have any value between zero and one. The larger the smoothing factor, the more influenced the average will be by more recent prices. If you want to relate the smoothing factor to the periods used in the standard moving average, set the factor equal to 2 divided by one plus the number of periods.
Moving averages are usually based upon the close but can be based on other price series such as the midpoint.
A simple moving average is a form of averaging in which all prices are given the same weight. It is calculated by starting with the oldest period specified and adding up specified prices (open, close, high, low, or volume) for the number of periods specified. The sum is then divided by the number of periods you specify in the Chart Settings window.
MAt = Moving Average
Pt = Selected calculation price
Pt-1 = Selected calculation price 1 period ago
Pt-n = Selected calculation price n periods ago
n = Number of bars (periods)
A linear-weighted moving average applies equal weight to all prices. The closing price is summed over n periods and divided by the total number of periods (n).
A form of weighted averaging in which all prices have influence on the average but with decreasing weight placed upon older prices. It is held widely that this form of a moving average is a better reflection of a stock's performance.
EMAt = Exponential moving average
EMAt-1 = Previous moving average value
Sf = Smoothing factor computed as 2/(n+1) where n = number of days in a standard moving average
For a table of smoothing factors, please see Smoothing Factors.
Source: The Encyclopedia of Technical Market Indicators, Colby and Meyers