I read about this indicator in an article titled "Build A Better Moving Average," which appeared in the October 2013 issue of Technical Analysis of Stocks and Commodities. The article was written by Richard D. Ahrens. In the article, Ahrens introduced an interesting new moving average of his own design called (coincidentally) the Ahrens Moving Average (AMA). The following article briefly summarizes the advantages of the AMA and provides sample AMIBroker code, which will allow you to experiment with the AMA in charts and in your strategies.
Smoothing the Data
The moving average is one of the oldest and most popular trend identification tools in technical analysis, yet all moving averages are influenced by fluctuations in the data, which can obscure the trend. As a result, we would prefer to have a smoother moving average - one that is less susceptible to noise in the underlying price data.
There are two ways to create a smoother moving average. First, we could smooth the price data before calculating the moving average. This technique could be applied to any moving average calculation. Ahrens proposes several techniques for smoothing the price data, but I will focus on just one in this article: the central pivot. The central pivot price is the average of the high price, low price, and closing price for a specified period.
The central pivot can also be used as the foundation for calculating daily, weekly, or monthly support (S1, S2) and resistance (R1, R2) levels for any price series. This is a powerful tool and I may devote a future article to pivot support and resistance levels. If you are interested in an example of how monthly pivot levels can be used in practice, I would encourage you to revisit "Symmetric TRIN Indicator Identifies Potential Reversals."
Most technicians calculate moving averages on the closing price, but this does nothing to reduce noise in the data. Ahrens provides detailed evidence about the advantages of various smoothing techniques in this article, which I would encourage you to read in detail. There are other techniques that offer additional smoothing over the central pivot, but the central pivot is more representative of the data.
Ahrens Moving Average (AMA)
Now that we have decided on a data series, the algorithm for calculating the moving average itself can also provide additional smoothing benefits. Below is a screenshot of the AMIBroker code for the Ahrens Moving Average (AMA). I use a screenshot to display the code (Figure 1 below), because my blog platform corrupts the code when copied and pasted. As a result, you would need to type the code manually into AMIBroker if you would like to experiment with the AMA.
The AMIBroker code calculates the AMA of the central pivot price for your choice of periods. If you would like to use the AMA in other strategies or indicators, I suggest you use the AMIBroker code sample to create an AMA function that could be called directly.
A Visual Example
When a moving average manipulates the underlying price data, this imposes a delay, which causes the moving average to lag the price data. Different levels of smoothing create different delays. Figure 2 below is a daily candlestick chart of the S&P 500 index from May 2013 to October 2013. The blue dashed line is a 15-day simple moving average. The solid purple line is a 22-day exponential moving average. The solid orange line is an 11-day AMA.
I varied the periods to coordinate the delays in the three moving averages. Note how the peaks and troughs in each moving average are consistent for all three moving averages. In other words, all of the moving averages reach their respective peaks and troughs at approximately the same time.
The AMA tracks the data more closely than the other two moving averages and it is significantly smoother as well. This makes it more useful in identifying the underlying trend in the price data.
Ahrens was kind enough to share the results of his moving average research in his article. Trading magazines and blogs are excellent sources of new ideas for indicators and strategies. The AMA looks promising and I encourage you to read the Ahrens article in the October 2013 issue of Technical Analysis of Stocks and Commodities. I hope you find the sample AMA code useful in your trading.
Trader Edge Strategy E-Subscription Now Available: 20% ROR
The Trader Edge Asset Allocation Rotational (AAR) Strategy is a conservative, long-only, asset allocation strategy that rotates monthly among five large asset classes. The AAR strategy has generated 20%+ annual returns over the combined back and forward test period. Please use the above link to learn more about the AAR strategy.
Your comments, feedback, and questions are always welcome and appreciated. Please use the comment section at the bottom of this page or send me an email.
If you found the information on www.TraderEdge.Net helpful, please pass along the link to your friends and colleagues or share the link with your social or professional networks.
The "Share / Save" button below contains links to all major social and professional networks. If you do not see your network listed, use the down-arrow to access the entire list of networking sites.
Thank you for your support.