Saturday, November 12, 2011

Average Directional Index on NIFTY


Average Directional Index (ADX)
Introduction
 The Average Directional Index (ADX), Minus Directional Indicator (-DI) and Plus Directional Indicator (+DI) represent a group of directional movement indicators that form a trading system developed by Welles Wilder. Wilder designed ADX with commodities and daily prices in mind, but these indicators can also be applied to stocks. The Average Directional Index (ADX) measures trend strength without regard to trend direction. The other two indicators, Plus Directional Indicator (+DI) and Minus Directional Indicator (-DI), complement ADX by defining trend direction. Used together, chartists can determine both the direction and strength of the trend.
 Wilder features the Directional Movement indicators in his 1978 book, New Concepts in Technical Trading Systems. This book also includes details on Average True Range (ATR), the Parabolic SAR system and RSI. Despite being developed before the computer age, Wilder's indicators are incredible detailed in their calculation and have stood the test of time.
Directional Movement
 Plus Directional Movement (+DM) and Minus Directional Movement (-DM) form the backbone of the Average Directional Index (ADX). Wilder determined directional movement by comparing the difference between two consecutive lows with the difference between the highs.

Directional movement is positive (plus) when the current high minus the prior high is greater than the prior low minus the current low. This so-called Plus Directional Movement (+DM) then equals the current high minus the prior high, provided it is positive. A negative value would simply be entered as zero.
 Directional movement is negative (minus) when the prior low minus the current low is greater than the current high minus the prior high. This so-called Minus Directional Movement (-DM) equals the prior low minus the current low, provided it is positive. A negative value would simply be entered as zero.
 The chart above shows four calculation examples for directional movement. The first pairing shows a big positive difference between the highs for a strong Plus Directional Movement (+DM). The second pairing shows an outside day with Minus Directional Movement (-DM) getting the edge. The third pairing shows a big difference between the lows for a strong Minus Directional Movement (-DM). The final pairing shows an inside day, which amounts to no directional movement (zero). Both Plus Directional Movement (+DM) and Minus Directional Movement (-DM) are negative and cancel out each other. Negative values revert to zero. All inside days will have zero directional movement.
Calculation
 The calculation steps for the Average Directional Index (ADX) are detailed in each step. Average True Range (ATR) is not detailed because there is an entire ChartSchool article for this. Basically, ATR is Wilder's version of the two period trading range. Smoothed versions of Plus Directional Movement (+DM) and Minus Directional Movement (-DM) are divided by a smoothed version Average True Range (ATR) to reflect the true magnitude of a move. The example below is based on a 14-day ADX calculation.
 1. Calculate the True Range (TR), Plus Directional Movement (+DM) and Minus Directional Movement (-DM) for each period.
 2. Smooth these periodic values using the Wilder's smoothing techniques. These are explained in detail in the next section.
 3. Divide the 14-day smoothed Plus Directional Movement (+DM) by the 14-day smoothed True Range to find the 14-day Plus Directional Indicator (+DI14). Multiply by 100 to move the decimal point two places. This +DI14 is the Plus Directional Indicator (green line) that is plotted along with ADX.
 4. Divide the 14-day smoothed Minus Directional Movement (-DM) by the 14-day smoothed True Range to find the 14-day Minus Directional Indicator (-DI14). Multiply by 100 to move the decimal point two places. This -DI14 is the Minus Directional Indicator (red line) that is plotted along with ADX.
 5. The Directional Movement Index (DX) equals the absolute value of +DI14 less - DI14 divided by the sum of +DI14 and - DI14.
 6. After all these steps, it is time to calculate the Average Directional Index (ADX). The first ADX value is simply a 14-day average of DX. Subsequent ADX values are smoothed by multiplying the previous 14-day ADX value by 13, adding the most recent DX value and dividing this total by 14.
 Below is a spreadsheet example with all steps involved. There is a 119 day calculation gap because around 150 periods are required to absorb the smoothing techniques. ADX enthusiasts can click here to download this spreadsheet and see the gory details. The chart below shows an example of ADX using the Nasdaq 100 ETF (QQQQ).

Wilder's Smoothing
 As seen in the ADX calculation, there is a lot of smoothing involved and it is important to understand the effects. Because of Wilder's smoothing techniques, it can take around 150 periods of data to get true ADX values. Wilder uses similar smoothing techniques with his RSI and Average True Range calculations. ADX values using only 30 periods of historical data will not match ADX values using 150 periods of historical data. ADX values with 150 days or more of data will remain consistent.
 The first technique is used to smooth each period's +DM1, -DM1 and TR1 values over 14 periods. As with an exponential moving average, the calculation has to start somewhere so the first value is simply the sum of the first 14 periods. As shown below, smoothing starts with the second 14-period calculation and continues throughout.
First TR14 = Sum of first 14 periods of TR1
Second TR14 = First TR14 - (First TR14/14) + Current TR1
Subsequent Values = Prior TR14 - (Prior TR14/14) + Current TR14
 The second technique is used to smooth each period's DX value to finish with the Average Directional Index (ADX). First, calculate an average for the first 14 days as a starting point. The second and subsequent calculations use the smoothing technique below:
First ADX14 = 14 period Average of DX
Second ADX14 = (First ADX14 x 13) + Current DX Value
Subsequent ADX14 = (Prior ADX14 x 13) + Current DX Value

Interpretation
 The Average Directional Index (ADX) is used to measure the strength or weakness of a trend, not the actual direction. Directional movement is defined by +DI and -DI. In general, the bulls have the edge when +DI is greater than - DI, while the bears have the edge when - DI is greater. Crosses of these directional indicators can be combined with ADX for a complete trading system.
 Before looking at some signals with examples, keep in mind that Wilder was a commodity and currency trader. The examples in his books are based on these instruments, not stocks. This does not mean his indicators cannot be used with stocks. Some stocks have price characteristics similar to commodities, which tend to be more volatile with short and strong trends. Stocks with low volatility may not generate signals based on Wilder's parameters. Chartists will likely need to adjust the indicator settings or the signal parameters according to the characteristics of the security.
Trend Strength
 At its most basic the Average Directional Index (ADX) can be used to determine if a security is trending or not. This determination helps traders choose between a trend following system or a non-trend following system. Wilder suggests that a strong trend is present when ADX is above 25 and no trend is present when below 20. There appears to be a gray zone between 20 and 25. As noted above, chartists may need to adjust the settings to increase sensitivity and signals. ADX also has a fair amount of lag because of all the smoothing techniques. Many technical analysts use 20 as the key level for ADX.

The chart above shows Nordstrom (JWN) with the 50-day SMA and 14-day Average Directional Index (ADX). The stock moved from a strong uptrend to a strong downtrend in April-May, but ADX remained above 20 because the strong uptrend quickly changed into a strong downtrend. There were two non-trending periods as the stock formed a bottom in February and August. A strong trend emerged after the August bottom as ADX moved above 20 and remained above 20.

DI Crossover System
 Wilder put forth a simple system for trading with these directional movement indicators. The first requirement is for ADX to be trading above 25. This insures that prices are trending. A buy signal occurs when +DI crosses above - DI. Wilder based the initial stop on the low of the signal day. The signal remains in force as long as this low holds, even if +DI crosses back below - DI. Wait for this low to be penetrated before abandoning the signal. This bullish signal is reinforced if/when ADX turns up and the trend strengthens. Once the trend develops and becomes profitable, traders will have to incorporate a stop-loss and trailing stop should the trend continue. A sell signal triggers when - DI crosses above +DI. The high on the day of the sell signal becomes the initial stop-loss.


The chart above shows Medco Health Solutions with the three directional movement indicators. The green dotted lines show the buy signals and the red dotted lines shows the sell signals. Wilders initial stops were not incorporated in order to focus on the indicator signals. As the chart clearly shows, there are plenty of +DI and - DI crosses. Some occur with ADX above 20 validate signals. Others occur to invalidate signals signals. As with most such systems, there will be whipsaws, great signals and bad signals. The key, as always, is to incorporate other aspects of technical analysis. For example, the first group of whipsaws in September 2009 occurred during a consolidation. Moreover, this consolidation looked like a flag, which is a bullish consolidation that forms after an advance. It would have been prudent to ignore bearish signals with a bullish continuation pattern taking shape. The June 2010 buy signal occurred near a resistance zone marked by broken support and the 50-62% retracement zone. It would have been prudent to ignore a buy signal so close to this resistance zone.

The chart above shows AT&T (T) with three signals over a 12 month period. These three signals were pretty good, provided profits were taken and trailing stops were used. Wilders Parabolic SAR could have been used to set a trailing stop-loss. Notice that there was no sell signal between the March and July buy signals. This is because ADX never moved below 20 to make the signals possible.
Conclusions
 The directional movement indicator calculations are complex, interpretation is straight-forward and successful implementation takes practice. +DI and - DI crossovers are quite frequent and chartists need to filter these signals with complementary analysis. Setting an ADX requirement will reduce signals, but this uber-smoothed indicator tends to filter as many good signals as bad. In other words, chartists might consider moving ADX to the back burner and focusing on the Directional Indicators to generate signals. These crossover signals will be similar to those generated using momentum oscillators. Therefore, chartists need to look elsewhere for confirmation help. Volume-based indicators, basic trend analysis and chart patterns can help distinguish strong crossover signals from weak crossover signals. For example, chartists can focus on +DI buy signals when the bigger trend is up and - DI sell signals when the bigger trend is down.
SharpCharts

 SharpCharts users can plot the directional movement indicators by selecting Average Directional Index (ADX) from the indicator drop-down list. By default, ADX will be in black, the Plus Directional Indicator (+DI) in green and the Minus Directional Indicator (-DI) in red. This makes it easy to identify directional indicator crosses. While ADX can be plotted above, below or behind the main price plot, it is recommended to plot above or below because there are three lines involved. A horizontal line can be added to help indentify ADX moves. The chart example below also shows the 50-day SMA and Parabolic SAR plotted behind the price plot. The moving average is used to filter signals. Only buy signals are used when trading above the 50-day moving average. Once initiated, the Parabolic SAR can be used to set stops. Click here for a live example of ADX.

Suggested Scans

Overall Uptrend with +DI Crossing above -DI: This scan starts with stocks that average 100,000 shares daily volume and have an average closing price above 10. An uptrend is present when trading above the 50-day SMA. A buy signal is possible when ADX is above 20. This signal materializes when +DI moves above - DI.
Overall Downtrend with - DI Crossing above +DI: This scan starts with stocks that average 100,000 shares daily volume and have an average closing price above 10. An downtrend is present when trading below the 50-day SMA. A sell signal is possible when ADX is above 20. This signal materializes when -DI moves above +DI.
(Courtesy www.stockcharts.com)

ADX on Nifty Daily Charts



Now let us watch it on Nifty Daily Charts for trading signals. On 24.06.2011 watch the green line(+DI) cross the red(-DI) line setting the uptrend for Nifty. Also watch the yellow line(for momentum) of the uptrend. The momentum then turned sideways and the green line(+DI) turned downwards early before the downtrend on Nifty(divergence).We got a huge spike on 07.07.2011 with a low reading on green line(+DI) which was our signal for change in trend. After that the price action on Nifty is sideways as indicated by the green(+DI) and red(-DI) lines and the yellow line(momentum) coming down. On 27.10.2011 we see the red(-DI) cross the green(+DI) which was the signal to short the Nifty or ad to earlier positions. Watch the yellow line (momentum) and red line(-DI) both moving sync with each other depicting the strength of the move& correspondingly the green line(+DI) moving down also signifying the down move. In all good 1000 points move very rarely seen. On 22.08.2011 the momentum yellow line was signaling the move losing its strength(cover the additional position of shorts on Nifty).On 29.08.2011 it signaled the end of the move(cover all shorts on Nifty) with the green line(+DI) touching the red line(-DI) first time( on 02.09.2011) after a gap of 21 trading days. The price action is pretty side ways after that on Nifty  the momentum yellow line shows it clearly by decreasing in value. On 07.10.2011 we see the green line(+DI) cross the red(-DI) a buy signal with gap up on Nifty. On 10.10.2011 the yellow line starts rising & the red line is declining in value confirming the trend.On 28.10.2011 the high marks the end of the move. After which the momentum line starts decreasing in value & green line is in sync with it. So longs On Nifty were to be sold on 31.10.2011.The move on Nifty was from  4900(open on 10.10.2011) to 5344(close on 31.10.2011) i.e.  444 points of Nifty.
Happy Trading!

3 comments:

  1. Hi Bramesh,

    Thanks for your kind words.

    Regards

    K B Raut

    ReplyDelete
  2. Thank you very much Sir,this has really cleared lot of my doubts. Will learn more .....

    Regards

    ReplyDelete

Note: Only a member of this blog may post a comment.

My Blog List