Better Know an Indicator: ADX

The ADX is one of the more complicated indicators in a trader’s arsenal.  Honestly, it looked like bad’s child’s crayon coloring the first time I saw it.   The reason why the ADX is complex is because it is a compilation of many indicators created by J. Welles Wilder in his book New Concepts in Technical Trading.  The book is worth the read because his ideas have been so influential on previous and contemporary traders.  (I also heard from an elf that it is easy to find a pdf of the book on google.)

I am going to give a basic overview of the indicator and its interpretation and then backtest these ideas on historical BTC data.   The ADX is designed to indicate changes in momentum and the direction and strength of a trend.   The indicator does this by first calculating the Directional Movement Index (DMI).

The DMI generally consists of the difference between two different values the DM+(blue or green) and the DM-(red).  The DM+ and DM- consist of the net difference between the most recent highs and lows.  Changes in momentum are generally detected when the DM+ crosses the DM- and vice versa.    Additionally, the direction of the trend is determined by whether or not the DM+ or DM- has a higher value.

The creation of the ADX is based on the DMI and various smoothing techniques.  This involves taking the difference between the absolute value of the DM+ and DM- and dividing it by the sum of the DM+ and DM-.  The calculation is somewhat complex and can be found in more detail at

The traditional interpretation of the indicator involves using the ADX line (green or blue) to indicate a trend.  When the ADX is below 20, then the markets are moving sideways.  If it is above 20, then the markets are trending.  Trading signals are determined when there is a crossover of the DM+ and DM-.   Here is an example:

Now that we have the basics of the ADX down let’s do some historical research. I am going to do two backtests using the default parameters for the ADX and a non-optimized position sizing strategy that trades approx 1,000 (or less) on each trade.  The position sizing strategy helps to focus on the performance of the indicator itself.  The downside is that it limits comparisons with buy/hold.  Since our focus here is the indicator research and not a fully developed strategy, then this is less of  a drawback.

I will create two separate strategies.  The first will be trade when the DM+ crosses above the DM- and use the ADX line above 20 as a filter (ADX Research).    The second will merely use the DMI without the ADX filter (DMI Research).  As usual, I will use NinjaTrader for the backtest and analysis.  I will post images of the results and provide links for the code.

Here is a summary of  the results of the ADX results:

Here is a summary of each trade

Here is short simulation of the strategy on Youtube to give you a picture of each trade.

Here is a summary of the DMI results

Here is a summary of each trade

Here is a short simulation on Youtube to give you a picture of each trade.

Here are some things to notice:

1. The ADX system does succeed at filtering out many whipsaw trades when the market is flat.  However, this increase in % profitable also comes with the cost of less total profit and a lower profit fact.

2. The total drawdown of each system is the same.  Importantly, the ADX filter does not decrease drawdown risk.  The ADX filter does not perform better on a return to risk basis.

3. One reason that the DMI indicator does well is because BTC prices trend and have low volatility when moving sideways.  If these features were to change, then the DMI indicator would do less well.   I am merely pointing out one of the many limitations that occur through backtesting.

Here is the code that can be imported directly into NinjaTrader

ADXResearch DMIResearch








One thought on “Better Know an Indicator: ADX

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s