Moving Avg Adaptive Filter

The Moving Avg Adaptive Filter (MAAF) was authored by Perry Kaufman in the Stocks and Commodities Magazine 03/1998. The MAAF uses price, previous price and a prior price in a series of mathematical manoeuvres including feedback to arrive at its final form. The user may change the input (close), period length and filter value. This indicator’s definition is further expressed in the condensed code given in the calculation below.

Moving Average Adaptive Filter

How To Trade Using Moving Avg Adaptive Filter

Moving Avg Adaptive Filter may be used in conjunction with other indicators. No trading signals are given.

How To Access in MotiveWave

Go to the top menu, choose Study>Moving Average>Moving Avg Adaptive Filter

or go to the top menu, choose Add Study, start typing in this study name until you see it appear in the list, click on the study name, click OK.

Important Disclaimer: The information provided on this page is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security. Please see our Risk Disclosure and Performance Disclaimer Statement.

Calculation

//input = price, user defined, default is close
//period = user defined, default is 10
//filter = user defined, default is .15
//prev = previous, abs = absolute value
//pow = power, index = current bar number
//std = standard deviation

fastest = 0.667;
slowest = 0.0645;
prevP = price[index-1];
diff = abs(price - prevP);
priorP = price[index-period];
signal = abs(price - priorP);
noise = sum(period, DIFF);
ratio = signal / noise;
sm = pow(ratio * (fastest - slowest) + slowest, 2);
prevAma = ifNull(price, ama[index-1]);  //returns price on first try
ama = prevAma + sm * (price - prevAma);
amaDiff = ama - prevAma;
PlotHist: MAAF = std(index, period, amaDiff) * filter;