Overview Buy Download Document Discussion

Document for Adaptive Moving Average indicator

Document for the indicator parameters

AdaptiveMethod
Type: EnumAdaptiveMethod
Default value: amVolatility
The adaptive method.
amVolatility -- Use the volatility to measure the look back.
amSwing -- Count the swing (highest and lowest peaks) to measure the look back.
amSymmetryZigZag -- Use the SymmetryZigZag indicator to measure the look back.
amUpDownBalance -- Count the bars of up and down to measure the look back.
amVariable -- Use Efficiency Ratio to measure the look back.
amFractal -- Use fractal to measure the look back.
amFixed -- Not adaptive, use fixed look back. Works same as the conventional indicator.

Volatility_Period
Type: int
Default value: 60
Used by amVolatility.
The period to count the volatility.
The look back period is between 2 and Volatility_Period.
The longer Volatility_Period, the longer period.
Recommend value range: 30-60.

Swing_Count
Type: int
Default value: 5
Used by amSwing.
The swing count to measure the look back.
The more swing count doesn't cause longer period.

SymmetryZigZag_Depth
Type: int
Default value: 5
Used by amSymmetryZigZag.
The bar count to look for a peak.

SymmetryZigZag_Count
Type: int
Default value: 5
Used by amSymmetryZigZag.
The peak count to measure the look back.

UpDownBalance_Period
Type: int
Default value: 40
Used by amUpDownBalance.
The period to count the up/down bars.
The look back period is between 2 and UpDownBalance_Period.
Despite of the UpDownBalance_Period, amUpDownBalance tends to generate a lot of 2-period look back, which causes very fast signals. And the signals are usually invalidated in 1 or 2 two bars. So it's recommended to only use this method for scalping or intra day trading (if the indicator is plotted on H4 or D1).

Variable_Period
Type: int
Default value: 9
Used by amVariable.
The period to measure the look back.

Variable_VolitilityPeriod
Type: int
Default value: 14
Used by amVariable.
The period to measure the volatility.

Variable_TrendFactor
Type: double
Default value: 0.5
Used by amVariable.
The multiply factor. Usually between 0~1.

Fractal_Period
Type: int
Default value: 14
Used by amFractal.
The period to count the fractal.

Fractal_SlowPeriod
Type: double
Default value: 21
Used by amFractal.
The slow period to count the fractal.
The value must be larger than Fractal_Period.
The value can also be negative, which means Fractal_Period*Fractal_SlowPeriod is used as the slow period.

Fixed_Period
Type: int
Default value: 20
Used by amFixed.
The look back period.

Method
Type: MovingAverageMethod
Default value: methodEMA
The moving average method.
The first four methods are same with the ones in MT4.
The other methods are new in Adaptive Moving Average.
methodSMA -- Simple moving average.
methodEMA -- Exponential moving average.
methodSmoothed -- Smoothed moving average.
methodLinearWeighted -- Linear weighted moving average.
methodVolumeWeighted -- Volume weighted moving average.
methodDEMA -- Double exponential moving average.
methodTEMA -- Triple exponential moving average.

AppliedPrice
Type: PriceType
Default value: ptClose
The price type to apply to the indicator.
ptClose -- The bar Close price.
ptOpen -- The bar Open price.
ptHigh -- The bar High price.
ptLow -- The bar Low price.
ptMedia -- Median price, (High + Low) / 2.
ptTypical -- Typical price, (High + Low + Close) / 3.
ptWeighted -- Weighted close price, (High + Low + Close + Close) / 4.
All above 7 price types are same as MT4 applied price types.

ptMean1221 -- John Ehlers smoothing price. (C1 * 1 + C2 * 2 + C3 * 3 + C4 * 1) / 6. This leads more smoothing price, less false signals and more lag indicator.

OnlyRefreshOnNewBar
Type: bool
Default value: false
true -- only refresh data when current bar is closed.
false -- refresh data on every tick.
Set to true will improve performance in back testing.

Document for EA developers

Index buffer 0: the Moving Average values.
Index buffer 1: the look back period values.