Raufman designed the AMA to track the degree of noise in the trend. For example, if a market is advancing with very small countertrend moves, there is very little noise and you would want the moving average to closely track the trend, which would require a moving average with a short lookback period.

However, if the market is moving sideways and the closes are tending to simply reverse from one period to the next, the degree of noise is high and you would want a moving average with a longer look-back period to filter out this noise and avoid false signals. Kaufman’s technique was to modify the exponential moving average (EMA) with an algorithm that would adjust the average’s smoothing constant (SC) according to the ratio of market direction to volatility.

The formula for the EMA is:

EMA = SC * (close-EMA(-1)) + EMA(-1)where:

SC = smoothing constantclose = close of the bar

EMA(-1) = previous bar’s EMA reading

The smoothing constant is a value between 0 and 1 that determines the “length” of the EMA. (Typically, to begin calculating an EMA, you use the SMA value for the initial reading.) To convert an SMAlook-back period into an EMA smoothing constant, the following formula can be used:

SC = 2/(n+1)Where n is the look-back period in an SMA.

For example, a 10-period SMA equates to an EMA with a smoothing constant of 0.1818 (SC =2/[10+1]).

One difference between the EMA and the SMA is the EMA calculation is the difference between the close and the EMA. Therefore, if the close is above the EMA, even for the first time, the difference is positive and the EMA will turn up. Similarly, if the close is below the EMA, even for the first time, the difference is negative and the EMA will turn down.

An SMA does not necessarily change direction because of this relationship, because the close is just one of many used in the average calculation. For a 10-period SMA, for example, the current close is only one-tenth of the 10 closes used to calculate the indicator. As a result, the SMAis not as responsive to quick price changes. The EMA is better suited to deal with these attributes of the market.