Understanding ADX: Your Guide to Measuring Trend Strength
So you've been trading for a while and keep hearing people talk about ADX. What's the big deal with this indicator? Well, let me break it down for you in a way that actually makes sense.
The Average Directional Index (ADX) is basically your trend strength meter. Think of it like a speedometer for trends - it doesn't tell you which direction the market is going, but it tells you how fast it's moving in whatever direction it's headed.

What Exactly is ADX?

Back in 1978, a guy named J. Welles Wilder came up with this indicator. He was trying to solve a problem that many traders face: how do you know if a trend is actually strong enough to trade?
Here's how it works: ADX gives you a number between 0 and 100. The higher the number, the stronger the trend. It's that simple.
- 0-25: The market is basically going sideways. Don't expect much movement.
- 25-50: Now we're talking! There's a decent trend happening.
- 50-75: This is a strong trend. Pay attention.
- 75-100: Extremely strong trend. These don't happen often, but when they do, they're usually worth watching.
But here's the thing - ADX doesn't work alone. It comes with two buddies:
The Three Amigos: +DI, -DI, and ADX
Think of these three indicators as a team:
- +DI (Positive Directional Indicator): This measures how much upward pressure there is in the market.
- -DI (Negative Directional Indicator): This measures downward pressure.
- ADX: This is the referee that tells you how intense the fight between bulls and bears is getting.
When +DI is above -DI, the bulls are winning. When -DI is above +DI, the bears have control. And ADX tells you how confident you should be in that direction.
Using ADX in Pine Script
If you're coding your own indicators in Pine Script, there's a handy function called ta.dmi()
that does all the heavy lifting for you.
Here's what it looks like:
ta.dmi(diLength, adxSmoothing) → [series float, series float, series float]
You give it two numbers:
- diLength: How many periods to look back for the directional indicators
- adxSmoothing: How much to smooth out the ADX line
And it spits back three values: +DI, -DI, and ADX.
A Real Example You Can Use
Here's some actual Pine Script code that creates an ADX indicator:
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Pineify
//@version=6
indicator(title="ADX Trend Strength", shorttitle="ADX", format=format.price, precision=4, overlay = false)
len = input.int(14, minval=1, title="DI Length")
lensig = input.int(14, title="ADX Smoothing", minval=1, maxval=50)
[diplus, diminus, adx] = ta.dmi(len, lensig)
plot(adx, color=color.red, title="ADX")
plot(diplus, color=color.blue, title="+DI")
plot(diminus, color=color.orange, title="-DI")
This creates a simple indicator that shows all three lines on your chart. The red line is your trend strength meter, blue shows bullish pressure, and orange shows bearish pressure.
How I Actually Use ADX in Trading
Here's where it gets practical. Most traders look for crossovers between +DI and -DI as potential trade signals:
- When the blue line (+DI) crosses above the orange line (-DI), it might be time to consider buying
- When the orange line (-DI) crosses above the blue line (+DI), it might be time to consider selling
But here's the key - and this is where ADX really shines - you want to see that red ADX line above 25 when these crossovers happen. If ADX is below 20, the market is probably just chopping around, and those crossover signals are likely to be false alarms.
I learned this the hard way. I used to trade every crossover I saw, and I got chopped up pretty badly in sideways markets. Now I always check: is ADX telling me there's actually a trend worth following?
Mixing ADX with Other Indicators
ADX plays well with others. Here are a couple of combinations I've found useful:
ADX + RSI: Use RSI to spot when a stock is getting overbought or oversold, then use ADX to confirm there's enough trend strength to make a move worthwhile.
ADX + Moving Averages: Let moving averages show you the overall direction, then use ADX crossovers for your entry timing.
The Reality Check: ADX Isn't Perfect
Let me be honest with you - no indicator is perfect, and ADX has its quirks:
- In choppy, sideways markets, you'll get false signals even when you think you're being careful
- Sometimes the crossovers happen, but the price doesn't really go anywhere significant
- Like most indicators, it's based on past price action, so it's not predicting the future
The key is understanding these limitations and not putting all your eggs in the ADX basket.
My Take on ADX
After using ADX for a few years, here's what I've learned: it's not a magic bullet, but it's a really useful tool for answering one important question - "Is this trend worth my attention?"
If you're new to using ADX, start simple. Watch how it behaves on charts you know well. Notice how it acts differently in trending versus sideways markets. Get a feel for it before you start risking real money on its signals.
The most valuable thing ADX has taught me is patience. When ADX is low, I've learned to sit on my hands instead of forcing trades. When it's high and showing a clear directional bias, that's when I pay closer attention to potential opportunities.
Remember, trading isn't about finding the perfect indicator - it's about understanding the tools you use and knowing when they're most likely to help versus hurt your decision-making.
References:
- https://docs.algotest.in/signals/pinescripts/adx_strategy/
- https://pineify.app/resources/blog/pine-script-tadmi-a-comprehensive-guide
- https://www.youtube.com/watch?v=kqsi5XDqR1M
- https://www.youtube.com/watch?v=i6pvoXo_XyI
- https://stackoverflow.com/questions/75828537/i-want-to-make-a-pinescript-v5-strategy-with-adx-and-rsi-but-keep-receiving-the/75828581
- https://github.com/yaoyao-wang/dmi_and_adx
- https://www.tradingview.com/scripts/averagedirectionalindex/
- https://www.youtube.com/watch?v=Xde-JGbDeAo
- https://www.investopedia.com/terms/d/dmi.asp
- https://www.tradingview.com/scripts/directionalmovement/