The original MAD indicator is comprised of the difference of two simple moving averages. The length of the shorter moving average is determined by the desired smoothness of the indicator, and the length of the longer moving average is the length of the shorter plus the half-period of the dominant cycle in the data. The simple moving average uses a rectangular window in its generation, and the Fourier Transform of the sharp edges of this window lead to “sidelobe leakage” in its filter response. The solution to making a better average is to soften the sharp corners of the window. Ehlers nominated the Hann window having a cosine squared shape coefficient amplitude distribution across the length of the filter to be a proper compromise. The improved MAD filter is the combination of the two concepts above. That is, instead of taking the difference of two simple moving averages, the improved version takes the difference of two FIR filters that employ Hann windowing.

This is a companion discussion topic for the original entry at https://www.optuma.com/kb/optuma/tools/ehlers/improved-mad