A. While many times you can use your eyes to spot a stock's trend, sometimes it's hard to do so; also it will be helpful to know how strong is the stock's up or down trend. The best indicator to help you assess the strength of a stock's movement is Average Directional indeX (ADX).
What is ADX?
ADX is the average of the values of directional movement (DM) lines over a specific period. DM lines are calculated using current high and low prices.
How is DMI Calculated?
The Directional Movement Index (DMI) disregards the direction of security's price movement, it only attempts to determine if there is a trend and that trend's strength.
DMI includes four indicator lines:
- Positive Directional Indicator (+DMI) shows the difference between today's high price and yesterday's high price. These values are then added up from the past 14 periods and then plotted.
- Negative Directional Indicator (–DMI) shows the difference between today’s low price and yesterday’s low price. These values are then summed up from the past 14 periods and plotted.
- Average Directional Movement Index (ADX). ADX is a smoothing of the DX.
- Average Directional Movement Index Rating (ADXR) is a simple average of today’s ADX value and the ADX from 14 periods ago
How Is ADX Calculated?
- Calculate the True Range, +DI, and –DI for each period:
True Range is the greater of:
Current High – Current Low
Absolute value of Current High – Previous Close
Absolute value of Current Low – Previous Close
+DI
IF Current High – Previous High > Previous Low – Current Low
THEN +DI = the greater of Current High – Previous High OR 0
-DI
IF Previous Low – Current Low > Current High – Previous High
THEN –DI = the greater of Previous Low – Current Low OR 0
IF +DI AND -DI are both negative
THEN both +DI and –DI = 0
IF +DI AND -DI are both positive AND +DI > -DI
THEN +DI = Current High – Previous High AND –DI = 0
Else IF +DI < -DI
THEN +DI = 0 AND –DI = Previous Low – Current Low - Smooth the True Range, +DI, and –DI using Wilder’s smoothing technique.
- Divide the smoothed +DI by the smoothed True Range and multiply by 100 (this is the +DI that is plotted for the specified period).
- Divide the smoothed –DI by the smooth True Range and multiply by 100 (this is the –DI that is plotted for the specified period).
- Next calculate the Directional Movement Index (DX) which equals the (absolute value of the smoothed +DI – the smoothed –DI) /( the sum of the smoothed +DI and smoothed –DI )and multiply by 100.
- Next calculate the Average Directional Index (ADX). The first value for ADX is an average of the DX over the specified period. The following values are smoothed by multiplying the previous ADX value by the specified period – 1, adding the current DX value, and dividing this total by the period specified.
- Finally the Directional Movement Rating (ADXR) is calculated by the averaging the current ADX and the ADX value n-periods ago.
How Does ADX Work?
- High and rising levels of the ADX and ADXR indicate a strong trend, either up or down, signifying a trend following system may be appropriate. Typically if the ADX is above 25 it indicates a strong trend.
- Low and falling levels of the ADX and ADXR indicate a trendless market. Typically if the ADX is below 20 it indicates a trendless market.
The Bottom Line
A buy signal is given when DMI+ crosses above DMI-. A sell signal is given when DMI- crosses below DMI+. The ADX and ADXR lines are then used to measure the strength of these signals.
In our next blog post, we will discuss in more details how to use ADX to spot a stock's movement and strength of it.