← Back to Home
Trading Signal / Indicator
🧭

ADX — Average Directional Index

Quantify trend strength to filter low-quality setups.

Start Automating Free →

Want to automate this strategy? Try auto-Trading free — no credit card required.

ADX — Average Directional Index chart

Overview

What is ADX — Average Directional Index?

The Average Directional Index (ADX) is a trend strength indicator, also developed by J. Welles Wilder Jr., that measures how strong a trend is — regardless of direction. It is always plotted alongside two directional movement lines: +DI (positive directional indicator) and −DI (negative directional indicator).

ADX values range from 0 to 100. A reading below 20 indicates a weak or absent trend (range-bound market). Values between 20–25 mark the beginning of a trend. Above 25 indicates a strong trend; above 40 signals a very strong trend; above 50 is rare and indicates an extremely powerful move.

The key insight is that trend-following strategies (moving average crossovers, breakouts) perform poorly in markets with low ADX. Adding an ADX > 25 filter dramatically reduces false signals. Conversely, mean-reversion strategies work best when ADX is below 20.

The +DI/−DI crossover provides directional signals: when +DI crosses above −DI, the market is strengthening upward; the reverse for downward moves. Combined with the ADX reading, this creates a three-part signal: ADX is rising (trend is strengthening), +DI > −DI (bullish), ADX > 25 (trend is valid).

How It Works in auto-Trading

Automate It

auto-Trading computes ADX, +DI, and −DI on any timeframe. The strategy builder allows ADX to be used as a regime filter: trend strategies are enabled only when ADX > 25, and mean-reversion strategies are enabled only when ADX < 20. The +DI/−DI crossover block can trigger direct entry signals or act as a directional bias filter for other strategy logic.

Try Free →

Strategy Code

Pick a script below, copy it, and use it on your chart.

Pine Script (TradingView)

This is a TradingView Pine Script example for this indicator. Paste it into the TradingView Pine Editor, add it to your chart, and adjust inputs for your market and timeframe.

//@version=6
strategy("ADX — Average Directional Index", overlay=true)
adxLen = input.int(14, "ADX Length")
emaLen = input.int(100, "Trend EMA")
adx = ta.adx(adxLen)

Get full strategy code access

Enter your email address and full name to unlock this strategy code.

ThinkScript (thinkorswim)

This is a thinkorswim ThinkScript example for this indicator. Open thinkorswim, create a custom study, paste the script, and apply it to your chart.

input adxLength = 14;
input emaLength = 100;
def adxVal = ADX(adxLength);
def emaVal = ExpAverage(close, emaLength);
def buySignal = close > emaVal and adxVal > 25;

Get full strategy code access

Enter your email address and full name to unlock this strategy code.

Ready to automate ADX — Average Directional Index?

Join thousands of traders who use auto-Trading to execute this strategy automatically, 24/7.

Get Started Free →

All Strategies & Signals

Continue Learning

Trading Strategies

Trading Signals & Indicators