Here is the MAMA and F(R)AMA moving averages by John Ehlers.

Most technical analysis is quite simple but John Ehlers takes it one step further and incorporates fractals and sine waves into his analysis. The mathematics in his technical analysis indicators is really some of the most advanced that you can find. He releases most of his findings publicly on his website here. Some of his papers are really a must-read for those who want to take their technical analysis to the next level.

I wanted to backtest some of his strategies so I've converted his EasyLanguage code into C#.

In this share, I present to you the MAMA and FRAMA moving averages. These moving averages follow the logic of most moving averages, except for the fact that they take the cyclical pattern of the market into account. Therefore, false trading signals (when there is no trend) are less likely to occur. If anything, these averages are quite interesting to study. You can find the original MAMA paper here, and the original FRAMA paper here.

With moving averages, there is always a common problem: they work very well when the market is trending. When the market is neutral, however, they fail. John Ehlers decided to tackle this problem and decompose the market into a cyclical regime and a trending regime using an Empirical Mode Decomposition. The intuition behind this decomposition is that when the market is cyclical, you could use his Sine Wave Indicator. When the market is trending, you could use a moving average-based indicator, like the MAMA and FRAMA moving averages. Note that you can play with the parameters to change the sensitivity of the indicators.

I hope you like it. Happy coding.

Author