Syntax
public AMA(Bars bars, int period, string description)
public static AMA Series(Bars bars, int period)
Parameter Description
bars | Bars object |
period | Moving average period |
Description
Featured in Vitali Apirine's article in from
April 2018 issue of Technical Analysis of Stocks & Commodities magazine, the AMA (adaptive moving average) is designed to account for the location of the close relative to the high–low range. As other indicators of the same kind it helps determine the direction of a trend. The AMA changes rapidly when prices move swiftly and moves slowly when prices go sideways.
Calculation
- The multiplier (MLTP) = ABS[(Current Close - Lowest Low) - (Highest High - Current Close)] / (Highest High - Lowest Low)
- The smoothing constant:
- Fast SC (FastSC) = [MLTP ? (fastest SC - slowest SC) + slowest SC]2
- Slow SC (SlowSC) = [MLTP ? (2/(2+1) - 2/(30+1)) + 2/(30+1)]2
- SC = MLTP * (FastSC - SlowSC) + SlowSC;
Current AMA = Prior AMA + SC ? (Price - Prior AMA)
Interpretation
- Use the same rules that we apply to SMA when interpreting AMA.
Example
Please refer to
TASC April 2018 issue, "Adaptive Moving Averages (Apirine)".