Average Directional Index (ADX) is a technical indicator used by traders to measure the strength of a trend. Developed by Welles Wilder in 1978, it is used to determine the strength of a price trend in daily commodity trading. The ADX is an indicator of trend strength, not trend direction. It is calculated using both a positive directional indicator (+DI) and a negative directional indicator (−DI), as well as a Moving Average line, to determine the strength of a trend.

The ADX helps traders determine whether the trend is strong or weak. Wilder believed that if the ADX is above 25, a strong trend is present; if the ADX is below 20, the trend is weak or there is no trend at all. While this may be true, in practice traders often look for further confirmation from other technical indicators or factors before making a trading decision.

The +DI line is calculated by comparing the current high with the previous high and low for a certain period of time. If the current high is higher than the previous high, the +DI line is incremented by one; if the current low is below the previous low, the +DI line is decremented by one. The −DI line is calculated similarly, but using the current low instead of the current high.

The ADX is calculated using both the +DI and −DI lines. The calculation starts with the exponential moving average (EMA) of the +DI and −DI. The exponential moving average of the +DI and the −DI is then used to calculate the value of the ADX. The ADX is then plotted by joining the exponential moving average of the +DI with the exponential moving average of the −DI.

The ADX can be a useful tool in any form of market analysis. By determining the strength of a trend, traders can apply appropriate strategies to maximize their profits or limit their losses. However, it is important to remember that the ADX is an indicator of trend strength and not trend direction, and should be used in conjunction with other technical indicators for a clearer picture of the optimal entry and exit points.