VariablePeriodDMI

Parent Previous Next

VariablePeriodDMI(High, Low, Close, Periods);


High, Low, Close - Is the price that the indicator should be calculated on. These values can be smoothed before input.


Periods - This is an array or value containing the periods that should be used to calculate the DMI at each point. Most often the input here would be some kind of adaptor like the HomodyneDescriminator.


Most implementations of the DMI indicator use the wilder moving average. This implementation uses the exponential moving average as it can be made adaptive. The two moving averages are actually almost the same. For example, a 14 day wilder moving average is the same as a 27-day exponential moving average.


This indicator exports the following AFL variables and returns nothing.


PDM_Array, MDM_Array, ADX_Array