Where n is an integer representing the number of days in the study.
COL2 = DMI_UPDI
Directional Indicators ( -DI, +DI, DX, ADX)
These indicators were designed and popularized by Welles Wilder and are calculated exactly as he specified. Other software products use their own calculation methods. The calculations for them are fairly involved and are explained in his "New Concepts in Technical Analysis"