Last Updated on March 6, 2021 by Oddmund Groette
This article looks at the ADX indicator. The indicator was developed by Welles Wilder and released in his book from 1978 called New Concepts In Technical Trading Systems. Mr. Wilder was productive, and in the same book, he published perhaps the most used indicator of them all, the relative strength index (RSI), in addition to the average true range (ATR), and parabolic SAR. We will eventually cover all indicators and test them for profitability. The book was written before the personal computer came about, but the indicators are widely used to this very day.
Our research indicates the ADX indicator is somewhat useful on its own but adds value used alongside other indicators.
First of all:
What is the ADX indicator?
Mr. Wilder aimed to make a formula that measures the trend and the strength of the trend. He came up with the ADX indicator, an abbreviation for Average Directional Movement Index but is known as the ADX indicator. The aim of the indicator is to measure the underlying trend of the instrument. Unfortunately, Wilder’s book is out of print, but we are unsure if Wilder made the indicator a stand-alone indicator or used it together with other indicators. As you will see later in the article, we prefer to use it as a supplement to other indicators.
We must keep in mind that Wilder was a commodity trader, and the indicator was meant for swing trading in commodity futures, but it seems to work in more or less any instrument.
The ADX indicator involves many mathematical calculations and is, of course, very cumbersome to do by hand. Luckily we have computers, and most trading platforms have ADX as a standard indicator, which you can drop on the chart.
The indicator consists of three components:
- The Plus Direction Indicator (DI+)
- The Minus Direction Indicator (DI-)
- The ADX measures the strength of the trend based on the two above
The Plus and Minus Direction Indicators are referred to as the Directional Movement Indicators (DM). Please be aware that the indicator doesn’t indicate the direction of the trend, only the trend’s strength.
When the DI+ is rising, it means the uptrend gains momentum, and vice versa for the DI-. The DM is the absolute difference between the two readings and thus doesn’t say anything about the trend’s direction.
What does the ADX indicate?
By combining these three indicators, Mr. Wilder both measures the direction of the trend and the trend’s strength (or the lack of a trend). A high reading indicates a trending market, and a low reading indicates a non-trending market. The ADX was thus originally made as a trend indicator.
As with all indicators, it’s a lagging indicator. This means an uptrend or downtrend is confirmed when it’s already established. The ADX operates in a range from 0 to 100. The shorter the time frame, the more volatile the ADX. If you use time frames longer than ten days, you will notice the ADX rarely goes above 50, more or less in any market. What does this mean? Most markets are not trending.
How is the ADX calculated?
We recommend this link if you want to dig deeper into the calculations because of all the calculations involved.
What are the best settings for the ADX indicator?
Lets’s first start with a visual view of the ADX indicator:
When the red line (DI-) is above the green line (DI+), the trend is bearish (down). Opposite, when the green line (DI+) is above the red line (DI-) we can say the indications point toward a bullish trend.
As we can see, the bigger the difference between the DMs, the higher the readings on the ADX (the blue line). However, notice that the ADX starts turning down after the DMs have started contracting. Obviously, it’s a lagging indicator as it’s just a derivative of the price action in the chart.
The chart above is the ETF SPY, which tracks the S&P 500. Notice how the ADX rises during the Covid-19 debacle in March 2020. It reaches its climax on the bottom and then gradually goes down as SPY retreats from the lows. If you were a trend trader, you would be taken to the cleaners. The market is trending….until it’s not trending anymore.
The chart above shows a 15-day ADX. The ADX is rarely above 50, and thus we can conclude that the S&P 500 doesn’t trend much. If we use a 50-day ADX, the highest reading since 1993 is just under 30.
What about Gold? As a commodity, it should trend more? Since the year 2000, gold has never seen a reading above 25 for a 50-day ADX. To see readings above 80, we need to go down to a 5-day ADX.
Mr. Wilder established readings under 15 as non-trending and above 20 as trending.
Is the ADX a good indicator? Does the ADX indicator really work? Let’s test
As always, make sure you don’t base your decisions on anything you read on the internet or in a trading book unless it’s tested.
Obviously, the ADX can be used in a zillion ways. Only your own imagination limits the possibilities.
Let’s test some possible strategies based ONLY on the ADX formula:
DI+ and DI- crossover:
Let’s start with a crossover strategy based on the positive and negative directional indicators:
- If the DI+ crosses over the DI-, go long.
- If the DI+ crosses below DI-, exit the position.
The code in Amibroker is like this for a ten-day ADX:
Buy= Cross(PDI(10),MDI(10)) ; //PDI is the DM+ and MDI is the DI-
The equity curve ends up like this on the S&P 500 (no commissions and slippage):
The average trade is 0.42% and the CAGR is 5.4% and the strategy is invested 55% of the time. The profit factor is 1.71.
Does the strategy improve by using other time frames? No, it turns out that 10 days is one of the best time frames for the S&P 500.
How does the crossover perform on futures and other ETFs? To our surprise, it works the best on the S&P 500. Even on commodities, we fail to produce better numbers than in the S&P 500.
Let’s test a breakout of the ADX readings:
- ADX ends the day at an n-bar high
- DI+ is higher than DI-
- We sell when the DI+ ends below DI-
Here is the code in Amibroker with optimization:
Buy= ADX(ADXdays)>Ref(ADXhigh,-1) AND PDI(ADXdays)>MDI(ADXdays) ;
Sell= PDI(ADXdays)<MDI(ADXdays); //PDI is the DM+ and MDI is the DI-
The optimization indicates the best results on the S&P 500 is 35 days for the DMs (DI) and 15 days for the ADX high/breakout. In general, high numbers on both optimizations give the best results.
The equity curve looks like this for 35 and 15 days on the S&P 500:
The drawdown is small, 13.76%, compared to 55% for the buy and hold, but overall the CAGR is only 3.03% compared to 9.9% for buy and hold. Compounded the difference is enormous, of course.
Is it any better in other markets? No, the strategy performs best on the S&P 500 (again).
Which indicator works best with ADX?
Based on the two simple tests above it seems the ADX doesn’t do us much help on a stand-alone basis. The results are good, but not nearly good enough to be used on its own.
Can the ADX be of any use combined with other variables or indicators? Is it possible to use the ADX as a filter to enhance an existing trading strategy by removing a lot of unwanted and losing trades?
Perhaps surprisingly, the ADX improves many trading strategies. We write surprisingly because very few indicators really work.
Let’s test the RSI indicator together with the ADX. First, we test a two-day RSI and use it as a benchmark:
Buy= RSI(2)<15 ;
This gives this equity curve:
Let’s add an ADX filter to the RSI criteria.
What are we looking for? Are we looking for a high ADX reading or a low one? If we look at the first graph of this article, we observe that the ADX seems to oscillate up and down. This means trends are hard to find. Thus, we add the criteria that ADX for n-days must be higher than x. We sell when today’s close is higher than yesterday’s high.
This is the code in Amibroker:
Buy= RSI(2)<15 AND ADX(ADXdays)>ADXlimit;
This is an optimization, and the results indicate that the best results are by using a short number of days (5-10 days) and values around 30-40 for the ADX limit. This applies to a wide range of ETFs and futures. Hence, let’s make a strategy by using ADX(5) and that it must be higher than 35:
Buy= RSI(2)<15 AND ADX(5)>35;
This results in an equity curve like this:
Overall profits decrease due to fewer trades and subsequently less time spent in the market. But the average gain per trade goes up from 0.54% to 0.7% and the maximum drawdown decreases a little.
Is this a tradeable strategy? That’s something we will let the reader decide!
All testing in this article is done by using Amibroker:
The ADX performs reasonably well on its own but much better when used with another indicator.
In this article, we have explored just a tiny fraction of the possibilities with the ADX indicator. It’s a versatile indicator, and as shown in this article, could also be used as a mean-reverting tool, not as a trend-tool as it was originally made to be.
As always, we recommend you do proper backtesting yourself.
Disclosure: We are not financial advisors. Please do your own due diligence and investment research or consult a financial professional. All articles are our opinion – they are not suggestions to buy or sell any securities.