Mastering the Adaptive Moving Average (AMA) for Your Trading Strategy

Mike 2010.01.08 22:48 25 0 0
Attachments

The Adaptive Moving Average (AMA) is a powerful tool used in MetaTrader 5 that helps traders smooth out price fluctuations while minimizing lag, making it easier to spot trends.

This indicator was brought to life by Perry Kaufman in his insightful book, "Smarter Trading".

One common pitfall with traditional smoothing algorithms is that sudden price jumps can create misleading trend signals. While smoothing is essential, it often introduces lag that can hinder timely decision-making. The AMA was designed with these challenges in mind, helping you navigate the market more effectively.

Adaptive Moving Average Indicator

How the AMA Works:

To determine the current market state, Kaufman introduced the concept of the Efficiency Ratio (ER). This is calculated using the formula:

ER(i) = Signal(i) / Noise(i)

Where:

  • ER(i) - current value of the Efficiency Ratio;
  • Signal(i) = ABS(Price(i) - Price(i - N)) - the absolute difference between the current price and the price N periods ago;
  • Noise(i) = Sum(ABS(Price(i) - Price(i-1)), N) - the total of absolute price differences over N periods.

In strong trends, the Efficiency Ratio (ER) will approach 1, while in sideways markets, it will hover just above 0.

This ER value feeds into the exponential moving average formula:

EMA(i) = Price(i) * SC + EMA(i-1) * (1 - SC)

Where:

  • SC = 2/(n+1) - the EMA smoothing constant, where n is the period;
  • EMA(i-1) - the previous EMA value.

For fast-moving markets, the EMA period should be set to 2 (yielding a fast SC of 0.6667), while during non-trending periods, an EMA period of 30 is recommended (slow SC = 0.06452). This leads us to introduce the scaled smoothing constant (SSC):

SSC(i) = (ER(i) * (fast SC - slow SC) + slow SC

Or alternatively:

SSC(i) = ER(i) * 0.60215 + 0.06425

To make the smoothing constant more effective, Kaufman suggests squaring it.

The final calculation for the AMA is as follows:

AMA(i) = Price(i) * (SSC(i)^2) + AMA(i-1) * (1 - SSC(i)^2)

Rearranged, it looks like this:

AMA(i) = AMA(i-1) + (SSC(i)^2) * (Price(i) - AMA(i-1))

Where:

  • AMA(i) - current value of the AMA;
  • AMA(i-1) - prior value of the AMA;
  • SSC(i) - current value of the scaled smoothing constant.
List
Comments 0