ADX

Category: Indicators

The Average Directional Index (ADX) is a technical indicator used to quantify the strength of a trend in the financial markets. The ADX is derived from the directional movement indicators (+DI and -DI) which help determine trend direction. The calculation of ADX involves several steps, starting with the determination of +DM and -DM, followed by smoothing these values to get +DI and -DI, and finally calculating the ADX value itself.

Syntax:

//N as Number of periods for calculation
ADX[N]

Example:

myPeriod = 21
myADX = ADX[myPeriod]
RETURN myADX coloured(9,169,243) as "Average Directional Index"

This example sets the period for the ADX calculation to 21 days and assigns the result to myADX. The ADX value is then returned with a specific color for better visualization.

  • +DM and -DM: These are measures of positive and negative directional movement respectively, calculated by comparing the difference between consecutive highs and lows.
  • +DI and -DI: These are the smoothed averages of +DM and -DM. They represent the positive and negative directional indicators.
  • DX: The Directional Movement Index (DX) is calculated as DX = 100 x (|+DI - -DI| / (+DI + -DI)).
  • ADX: The ADX is a smoothed moving average of the DX values over the specified period.

The ADX indicator does not indicate the direction of the trend, but rather the strength, with higher values suggesting a stronger trend. The ADX is often used in conjunction with +DI and -DI to determine the trend direction and its strength.

Related Instructions:

  • ADXR indicators
  • DIminus indicators
  • DIplus indicators
  • Logo Logo
    Loading...