How the ADX Indicator Works: Trend Strength and the +DI and -DI Lines

Cover of the article “How the ADX Indicator Works: Trend Strength and the +DI and -DI Lines”: two directional lines diverge while the overall strength line emerges from the weak zone

What the ADX indicator shows—and what it does not show

Fidelity describes ADX as a bounded oscillator whose values fluctuate between 0 and 100. TradingView's documentation and IG's educational materials confirm the same range. The scale has a fixed upper bound, so a value of 40 is always stronger than a value of 20, regardless of the instrument on which it appears.

Reference sources describe the indicator's role in equally unequivocal terms. StockCharts writes that ADX measures “the strength or weakness of a trend, not the actual direction.” TradingView puts it even more succinctly: “It does not take direction into account at all.”

Here is a short list of what ADX does and does not provide:

  1. It provides a single-number estimate of the strength of the current move.
  2. It shows how that strength is changing: a rising line means that the move is gaining momentum, while a falling line means that it is losing steam.
  3. It provides a common language for different instruments because the scale is the same everywhere.
  4. It does not indicate direction: ADX alone cannot tell you whether the price is rising or falling.
  5. It does not provide an entry point or set a stop-loss order.
  6. It does not provide a price target or tell you how long a move will last.
  7. It does not warn of a reversal: strength can also increase during a decline.
123

0: no directional movement

100: an extremely strong move

  1. 1.below 20: no trend
  2. 2.above 25: strong trend
  3. 3.above 50: very strong

below 20: no trend

above 25: strong trend

above 50: very strong

The boundaries are approximate and vary by instrument. Platform documentation uses the pair of 20 and 25, while some sources raise the strong-trend threshold to 40.

Because ADX is non-directional, it is rarely used on a chart by itself. If you are just putting together your toolkit, start by learning which indicators make sense for beginners, then return here when you need to assess the strength of a move.

How ADX, +DI, and -DI are related

Wilder designed Directional Movement as a system of three values, each of which is incomplete on its own. The two DI lines answer the question “which direction?” while the third line answers “how strongly?” Fidelity describes the combination as follows: the ADX line determines trend strength, while the two DMI lines complement it by helping determine direction.

LineWhat it measuresHow it is derivedHow it is interpreted
+DIthe strength of upward movementsmoothed upward movement divided by the true rangeabove -DI: buyers have the advantage
-DIthe strength of downward movementsmoothed downward movement divided by the true rangeabove +DI: sellers have the advantage
ADXthe strength of either side's advantagethe smoothed absolute difference between +DI and -DIrising: the move is strengthening

Fidelity summarizes the classic interpretation of crossovers in one sentence: a buy signal occurs when DMI+ crosses above DMI-, while a sell signal occurs when the opposite happens. This is where sources begin to disagree, and the disagreement is genuine. IG writes that most traders ignore the DI lines because they “tend to cloud the issue.” StockCharts, by contrast, bases its approach specifically on DI crossovers while adding external confirmation.

My conclusion from this debate is simple: the DI lines are useful for describing the balance of strength, not as an entry button. A single crossover proves nothing when the strength of the move is near zero.

How True Range, +DM, and -DM are calculated

The calculation begins with the true range. True Range is the largest of three values: the candle's high-to-low range, the distance from the high to the previous close, and the distance from the previous close to the low. The same value underlies a separate indicator that measures volatility. If this is new to you, see the guide explaining how true range helps set a stop-loss order.

Directional movement is calculated next. Wilder's rule is presented in public sources as follows:

  1. UpMove is today's high minus yesterday's high.
  2. DownMove is yesterday's low minus today's low.
  3. If UpMove is greater than DownMove and greater than zero, +DM equals UpMove; otherwise, +DM equals zero. The rule for -DM is the mirror image.

The crucial detail is hidden in the third point. Only one side is counted for each candle: either upward movement or downward movement, but never both at once. StockCharts describes the edge case directly: when both calculations are negative or equal, both values are set to zero. The reference TA-Lib implementation examines seven possible relative positions of two candles and arrives at the same rule.

An inside candle that lies entirely within the range of the previous candle produces no directional movement in either direction. This is precisely why ADX drifts lower in a narrow sideways market: the numerator is set to zero more often than the denominator.

How DX and ADX are derived from directional movement

Wilder uses his own smoothing method, and this is the first reason why values differ across descriptions. The first value equals the sum of the first 14 periods. After that, a recursive formula is used: subtract one fourteenth of the previous value from it, then add the current value. Tulip Indicators explains that this is an exponential average with a coefficient of 1/n instead of the conventional 2/(n+1), and that Wilder's smoothing over a period of 14 is equivalent to a standard exponential moving average with a period of 27.

  1. 1

    True Range for each candle

    The largest of three ranges, accounting for the previous close

  2. 2

    Plus DM and minus DM

    Changes in the high and low are compared, and the weaker one is set to zero

  3. 3

    Wilder's smoothing

    The first value is the sum over 14 bars, followed by a recursive calculation

  4. 4

    Plus DI and minus DI lines

    Smoothed movement is divided by the smoothed true range

  5. 5

    DX index

    The absolute difference between the lines is divided by their sum, discarding the sign

  6. 6

    Smoothed DX produces ADX

    Another 14-period average is applied to the completed DX

Six calculation steps using a period of 14. The first two are performed on each candle, after which Wilder's smoothing is applied.

The DX formula explains the indicator's defining feature. DX equals one hundred multiplied by the absolute difference between +DI and -DI, divided by their sum. StockCharts, the TA-Lib reference, and the English-language Wikipedia all provide the same formula. The absolute value removes the sign, and direction disappears along with it: a 30-point difference between the lines produces the same DX regardless of which line is higher.

The final step is to average DX using Wilder's method. The first ADX value equals the average of the first fourteen DX values. Each subsequent value is calculated by multiplying the previous ADX by 13, adding the current DX, and dividing by 14. This second smoothing makes the line smooth while also adding lag.

How ADX differs from DMI in TradingView and MetaTrader

TradingView's documentation answers the question directly: the built-in ADX indicator does not plot the +DI and -DI lines by itself. To see all three lines, you need the separate Directional Movement indicator. DMI has two parameters in its Inputs section: ADX, the smoothing period for the final line, and DI Length, the period used to calculate the DI lines themselves. Both default to 14. The ADX documentation page has no Inputs section at all, so the official pair of 14 and 14 is specifically confirmed for DMI.

The situation in MetaTrader 5 is more nuanced. The terminal includes two separate built-in indicators: Average Directional Movement Index and Average Directional Movement Index Wilder. According to MetaQuotes' description, the second strictly follows the algorithm in Wilder's book and uses a smoothed moving average, while the first uses a different smoothing method. The values of these two lines on the same chart do not match, even though their names are almost identical.

PlatformNameNumber of linesAvailable settings
TradingView, ADXAverage Directional Indexoneperiod (the documentation has no Inputs section)
TradingView, DMIDirectional Movement IndexthreeDI Length and ADX Smoothing, both 14 by default
MetaTrader 5ADX and a separate ADX Wilderthree buffersperiod, with different smoothing formulas
MetaTrader 4iADXthree buffersperiod and applied price
thinkorswimADXoneperiod and selectable averaging type

MetaTrader 4 warrants a separate row in this table: its iADX function has an applied price parameter—the price used in the calculation—while the MT5 version has no such parameter. Thinkorswim goes even further, allowing the averaging type to be selected from five options, including simple, exponential, and Wilder's smoothing. The same ADX on the same instrument produces different values there depending on the option selected.

Pine Script has no separate function for ADX. Everything is returned by ta.dmi, with ADX provided as the third element:

pine
[diPlus, diMinus, adx] = ta.dmi(14, 14)
plot(adx, "ADX")

This call pattern can be seen in published TradingView scripts. You cannot assign the result to a single variable because the compiler expects it to be unpacked into three variables.

What the DI period and ADX smoothing change

Many people overlook the separation between these parameters, but it has practical implications. Reduce DI Length, and the directional lines will cross more often because they respond to shorter bursts. A shorter ADX smoothing period makes the final line more erratic, causing it to jump across thresholds more frequently. Wilder used 14, and this remains the default in TradingView and MetaTrader.

A much more important question is how much history is needed before a value becomes meaningful at all. The first ADX(14) value does not appear until the 28th bar, which follows from the structure of the calculation. Fourteen bars are used for the initial smoothing of the true range and directional movement, so the first DI values appear on the fifteenth bar. Another fourteen DX values are then needed to calculate the first ADX average.

  1. Bar 1

    Only the true range is calculated

    Directional movement is compared with the previous bar

  2. Bar 15

    The first +DI and -DI values appear

    There was nothing to smooth before this: 14 completed values are required

  3. Bar 28

    The first ADX value

    Another 14 DX values are used for the second average

  4. Around bar 150

    The values stop drifting noticeably

    StockCharts' estimate: figures differ when less history is available

Calculation using a period of 14. The initial values depend on the bar from which the terminal began calculating, so they drift when only a short segment of history is available.

Another mechanism then comes into play, although reference materials rarely mention it. Wilder's recursive formula never forgets old values completely: their weight decreases but never reaches zero.

Consequently, two terminals with different depths of loaded history will show slightly different ADX values on the same bar. StockCharts estimates that around 150 periods of data are required for stable figures. TA-Lib documentation calls this the initial unstable period and gives the same explanation: early values depend on how much history precedes them.

Important. A discrepancy between values for the same instrument on two charts is more often explained by different history depths or smoothing methods than by a platform error. Check the settings and the length of the loaded data segment first.

Why the 20 and 25 thresholds do not provide a ready-made signal

The most common pair of boundaries is as follows: above 25 indicates a strong trend, below 20 indicates no trend, and the area between them is uncertain. StockCharts, Fidelity, and TradingView all cite these boundaries, while IG confirms only the upper one: a trend is considered strong above 25. Fidelity adds a useful detail: values above 60 are relatively uncommon.

The discrepancies begin immediately beyond this pair. StockCharts attributes the threshold of 25 to Wilder himself, then notes that many analysts use 20 instead. The English-language Wikipedia provides another scale: a weak trend below 20, a strong trend above 40, and an extremely strong trend above 50. That is a twofold difference, and the chosen scale changes every other decision.

SourceNo trendStrong trendCaveat
StockChartsbelow 20above 25many use 20 instead of 25
Fidelitybelow 20above 25readings above 60 are rare
IGnot specifiedabove 25strong moves can occur even with a weak ADX
TradingViewbelow 20above 25the boundaries depend on the instrument
Wikipediabelow 20above 40above 50: extremely strong

TradingView offers the most candid explanation for this variation: acceptable values differ from one instrument to another, so it is sensible to test an instrument against its own history. It also notes that Wilder developed the system for currencies and commodities, which are more volatile than stocks and exhibit stronger trends.

IG provides the best counterexample to a rigid scale: during a Nasdaq rally of more than 1400 points, ADX remained below 25 for most of the move. Formally, there was no trend; in reality, there was. IG's conclusion is worth memorizing verbatim: “No indicator is correct at all times.”

Where ADX helps and where it is better not to rely on it
Suitable for
  • Filtering out sideways markets before using a setup that works only when the market is moving
  • Comparing the strength of moves across different instruments: the scale is the same everywhere
  • Seeing from a falling line that a move is losing steam
  • Understanding why a signal failed in a flat market
Not suitable for
  • Determining direction: only the +DI and -DI lines do that
  • Anticipating a reversal: the indicator lags by design
  • Replacing a stop-loss order and position-size calculation
  • Using a single threshold for every instrument without testing it

How to check ADX manually on closed candles

This check takes an evening and eliminates half of your future arguments with yourself. Follow these steps:

  1. Choose one instrument and one timeframe, then fix a segment containing at least 30 closed candles. Do not include the open candle in the calculation because its high and low can still change.
  2. Record the high, low, and close of each candle in a table. Adjacent candles must be consecutive, with no gaps.
  3. Calculate the true range for each candle as the largest of the three values.
  4. Calculate UpMove and DownMove, apply the selection rule, and set the weaker side to zero.
  5. Add the first 14 values for true range, +DM, and -DM, then continue using Wilder's recursive formula.
  6. Divide the smoothed movement by the smoothed range and multiply by 100 to obtain +DI and -DI.
  7. Calculate DX and average its first 14 values. This is your first ADX value.

Next, add the DMI indicator with parameters of 14 and 14 to the same chart and compare the three numbers on the most recently closed candle. A discrepancy of a few hundredths is normal: libraries do not use the integer rounding found in the 1978 book, and differences in history depth also shift the result.

  1. Bars 1-6

    Narrow range, with ADX staying around 15

    Both DI lines are low, and neither side has the advantage

  2. Bar 7

    The price moves upward, but ADX is only 18

    The move has already begun, but it has not yet built up strength

  3. Bar 9

    ADX is 22, still below the threshold of 25

    At this point, the threshold filter would reject the trade

  4. Bar 11

    ADX crosses above 25

    The indicator remained silent for four candles of the move

  5. Bar 13

    ADX is 33, confirming the move

    Confirmation arrives after most of the move is already over

  6. Bar 14

    The price pulls back, while ADX is 32

    The strength line turns after the price does; this is normal

The values are hypothetical and provided for illustration; they are neither market quotes nor a signal. The key point is clear: the price moves upward on the seventh candle, but the strength line does not confirm the move until the eleventh.

This educational diagram illustrates the very reason for performing a manual check. The price moved upward on the seventh candle, but the line did not cross above 25 until the eleventh. The indicator remained silent for four candles of the move. This is how double smoothing works; nothing is broken.

How to test an ADX filter without overfitting to historical data

A typical task is framed like this: I have a setup and want to skip trades when the market is going nowhere. A threshold of 25 is used as the starting point because it is the most common boundary in platform documentation. From there, the integrity of the test depends entirely on the order of the steps and your discipline.

  1. 1

    Write down the baseline rule without ADX

    The filter is tested as an addition to an existing entry rule

  2. 2

    Set the threshold in advance

    Start at 25 and do not change it during the test

  3. 3

    Split the historical data into two parts

    Keep the second part sealed while configuring the first

  4. 4

    Run both versions consecutively

    Use the same fees and the same slippage

  5. 5

    Compare the result and the number of trades

    A filter almost always reduces the number of entries

  6. 6

    Open the holdout segment only once

    A second run on it will no longer be independent

Six steps that prevent the threshold from being fitted to a result you have already seen. The order matters more than the figures themselves.

The fifth step is the most important. A decline in the overall result proves nothing by itself if the number of trades fell threefold at the same time.

StockCharts explicitly warns about the main pitfall in this exercise: an ADX requirement does reduce the number of signals, but this heavily smoothed indicator filters out just as many good signals as bad ones. That is exactly what IG's Nasdaq example demonstrates. The decision must therefore be based on both figures together, not on whichever one looks more appealing.

If the filter does not help after testing, that is a valid result. It tells you that the strength of the move is not the main limiting factor for your rule and saves you months of work. Another way to filter out sideways markets is to look at the slope of a moving average and the price's position relative to it; how to interpret a moving average is covered separately.

Which mistakes most often distort the interpretation of ADX

Six situations occur more often than the rest:

  1. Reading direction from ADX. The line rises, and this is mistaken for a rising price. It rises in exactly the same way during a strong decline.
  2. Treating the threshold of 25 as universal. TradingView explicitly warns that acceptable values depend on the instrument and require historical testing.
  3. Trading on DI crossovers alone. Wilder himself supplemented them with the extreme point rule: the crossover bar establishes the point, and an entry occurs only when its level is broken. The rule was introduced to eliminate false signals.
  4. Comparing figures from different platforms. ADX and ADX Wilder in MetaTrader 5 are calculated differently, while thinkorswim even lets users select the averaging type manually.
  5. Reading the value on an open candle. The high and low can still change, altering the entire calculation chain along with them.
  6. Looking at a short segment of historical data. Values calculated from thirty bars differ from those that appear when one hundred and fifty bars are available.

A seventh mistake is more methodological: using the ADX indicator as the only tool on a chart. In its limitations section, TradingView recommends combining it with indicators that examine the price itself and help filter signals. If you are assembling such a combination, see the guide on how to build a set of indicators for a specific task.

Risks and limitations

  • The indicator does not guarantee a profit. A value above the threshold is a reason to analyze the chart, not an instruction to enter a trade.
  • Markets are volatile, and trading involves the risk of losing capital.
  • Past results do not guarantee future results.
  • ADX lags by design: it uses two consecutive smoothing operations, so confirmation arrives several candles after a move begins.
  • The indicator misses slow trends. IG's example of a Nasdaq rally of more than 1400 points shows a move during which the value remained below 25 most of the time.
  • There is no universal threshold standard: different authoritative sources provide scales that vary twofold.
  • Values depend on the platform, smoothing method, and depth of the loaded history, so it is incorrect to compare figures from two different charts.

Disclaimer. This is not personalized investment advice. Markets are volatile, and trading involves the risk of losing capital. Past results do not guarantee future results.

Sources

Frequently asked questions

What is ADX in trading?

ADX stands for Average Directional Index. Welles Wilder published it together with the +DI and -DI lines in his 1978 book, which also introduced RSI, ATR, and Parabolic SAR. It is calculated from closed candles, ranges from 0 to 100, and describes the strength of a move. It contains no direction: the formula takes the absolute difference between two lines and discards the sign.

How should I use ADX if I am just starting out?

Start with one task: distinguish a market that is going nowhere from one that is moving. Add the DMI indicator to your chart with its default settings so that you can see all three lines, then spend a week simply observing closed candles without trading anything. Note where the value stays below 20 and what the price does at those times.

After a week like this, the thresholds will no longer feel like someone else's numbers from an article, and the ADX indicator will become a familiar scale.

What default ADX period should I use?

Keep it at 14. This is Wilder's value, and it is the default in TradingView and MetaTrader, so your numbers will match those seen by most other traders. DMI in TradingView has two parameters, DI Length and ADX Smoothing, and both default to 14. It only makes sense to change them after you have run a test with the baseline value and know exactly what it is failing to provide.

Is ADX the same in TradingView and MetaTrader?

There is no confirmed evidence of a systematic discrepancy between these platforms. However, there are known differences even within a single terminal: MetaTrader 5 has two separate indicators, the regular version and the Wilder version, with different smoothing formulas, while MetaTrader 4 accepts an applied price parameter that the MT5 version does not have. Before comparing figures, check the indicator name, its parameters, and the depth of the loaded history.

Does ADX indicate a trend reversal?

No. A falling line means only that the move is losing strength; the price may move sideways rather than reverse. A reversal is a change in direction, and ADX contains no directional information at all. A crossover of +DI and -DI is considered the first sign of a shift in the balance of strength, but it also requires confirmation: TradingView's documentation notes that false signals occur most often at values below 25.

What you will learn
  • Separating strength from direction: what ADX measures and what the +DI and -DI lines measure
  • The complete calculation process from True Range to smoothed ADX, step by step
  • A protocol for manually checking values on closed candles without blindly trusting someone else's settings
  • An analysis of the 20 and 25 thresholds: why sources use different scales and what to do about it
Apply in 20 min
intermediate

Was this material useful?

Feedback is not available for this language version yet.

Comments

Source comments are not translated and are never replaced with Russian text.

Subject-matter contributor
Max Vitkovsky
Market analyst

Analyses cryptocurrency market structure, levels and on-chain context, with attention to risk and invalidation conditions.

TradingView chart with Buy and Sell signals from the Midas indicator
Midas multi-indicator for TradingViewOne of the most advanced indicators for trading
  • Non-repainting signals
  • Interactive technical analysis
  • 7 strategies to choose from
Midas multi-indicator for TradingViewSignal, stop, and 3 targets - directly on the chart
  • Signal locks at candle close
  • Stop and 3 targets build automatically
  • The trade plan is visible before entry