Where n is an integer representing the number of days in the study.

Example

Sample code

COL2 = DMI_DX[30]

Directional Indicators ( -DI, +DI, DX, ADX)

DX is defined as: (+DI minus -DI) / (+DI plus -DI) * 100

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"