ADX Indicator: Formula, DMI Signals, and What Tests Reveal

Price falls while a separate ADX line rises, showing the distinction between trend direction and strength.

Key takeaways

  • ADX measures smoothed directional imbalance; a rising ADX can accompany a falling price. Positive and negative DI supply direction.
  • In controlled tests, longer ADX smoothing could increase threshold-only activity while reducing activity under a rising-ADX entry gate.
  • Requiring a rising ADX changes which entries qualify. It does not guarantee that the remaining historical trades earn a higher return.

The Average Directional Index, or ADX, measures trend strength. The accompanying +DI and −DI lines help identify direction. A rising ADX can therefore accompany a strong decline as well as a strong advance.

Across 99,456 configuration evaluations, we varied the directional lookback, the smoothing of ADX, and the strength required for an entry. We also tested a familiar extra condition: require ADX to be rising. The distinction between the height of ADX and its slope changed which trades qualified.

What does ADX show?

ADX belongs to Welles Wilder’s Directional Movement system. Positive directional movement tracks an upward extension of the high; negative directional movement tracks a downward extension of the low. The calculation compares those changes and retains the dominant positive movement on each candle.

After smoothing and scaling by true range, they become +DI and −DI. When +DI is above −DI, upward directional movement dominates this measure. When −DI is above +DI, downward movement dominates.

ADX takes the size of their relative difference and smooths it again. Fidelity’s DMI reference describes the calculation and the distinction between trend direction and strength.

The ADX formula, step by step

The full calculation has two layers of smoothing:

Up move   = current high − previous high
Down move = previous low − current low

+DM = up move if it is positive and greater than the down move; otherwise 0
−DM = down move if it is positive and greater than the up move; otherwise 0

+DI = 100 × Wilder-smoothed +DM / Wilder-smoothed true range
−DI = 100 × Wilder-smoothed −DM / Wilder-smoothed true range

DX  = 100 × abs(+DI − −DI) / (+DI + −DI)
ADX = Wilder-smoothed DX

True range is the greatest of the candle’s high-low range, its high’s distance from the preceding close, and its low’s distance from that close. The displayed ratio needs a nonzero denominator.

Wilder smoothing updates an existing average by adding one nth of the difference between the new observation and that average. With length 14, each new observation has weight 1/14. Initialization also matters near the start of a chart. StockCharts documents Wilder’s smoothing and the calculation sequence.

If +DI is 30 and −DI is 10, DX is 50. Swap those two values and DX is still 50. The direction changed; the unsigned imbalance did not. That is why ADX alone cannot distinguish bullish from bearish movement.

Common ADX settings and signals

14 is a common directional lookback and smoothing length, often displayed as 14/14. These are two settings: one changes the DI inputs, while the other changes how the resulting DX observations become ADX.

Readings above 25 are commonly treated as stronger-trend conditions, and readings below 20 as weaker or less directional conditions. The area between them is not a guaranteed transition zone. These are conventions, rather than universal boundaries separating good and bad trades. Fidelity’s ADX guide discusses the familiar interpretation.

A DI crossover supplies direction. An ADX threshold can qualify its strength. A rising-ADX condition asks whether the smoothed strength reading has increased from the preceding candle. The three tests can disagree.

For example, +DI may be above −DI while ADX is falling from a high value. That still describes positive directional dominance with a weakening strength reading. It does not automatically mean the price is falling.

Why a rising ADX can accompany a falling market

Historical indicator values Trend strength rises during a price decline

A falling price can accompany a rising ADX. Direction comes from the DI lines; ADX smooths their imbalance.

The value table below is available without JavaScript.

Chart data
Data and calculation details
Source: Checksum-verified official Binance candles. Locally calculated indicator values from BTCUSDT two-hour candles. No strategy fills or returns are reconstructed. Exact source dates and selection appear in the provenance download.
Accessible value table (49 observations)
ObservationClosing price · CloseDMI 14 / ADX 14 · Positive DIDMI 14 / ADX 14 · Negative DIDMI 14 / ADX 14 · ADX
2024-08-02T10:00:00Z64,660.01020.45528.95632.789
2024-08-02T12:00:00Z65,229.99022.65025.55430.877
2024-08-02T14:00:00Z63,416.01017.91832.22230.709
2024-08-02T16:00:00Z63,098.01017.07130.69930.553
2024-08-02T18:00:00Z62,633.57016.17432.43630.760
2024-08-02T20:00:00Z61,987.01014.03236.69931.754
2024-08-02T22:00:00Z61,498.33013.03534.48432.710
2024-08-03T00:00:00Z61,342.01011.94136.57434.001
2024-08-03T02:00:00Z61,895.99013.05434.63334.804
2024-08-03T04:00:00Z61,693.99012.55033.17235.540
2024-08-03T06:00:00Z61,662.01012.27532.44536.223
2024-08-03T08:00:00Z61,735.99011.98932.97736.970
2024-08-03T10:00:00Z61,919.38013.77732.05237.177
2024-08-03T12:00:00Z62,007.99015.06431.06036.999
2024-08-03T14:00:00Z60,879.00013.37536.03937.632
2024-08-03T16:00:00Z60,576.00012.37137.05338.511
2024-08-03T18:00:00Z60,246.00011.42738.09939.607
2024-08-03T20:00:00Z60,648.00010.49135.55040.666
2024-08-03T22:00:00Z60,697.99010.08234.16441.649
2024-08-04T00:00:00Z60,743.5809.64633.13142.595
2024-08-04T02:00:00Z60,735.00012.02231.85542.782
2024-08-04T04:00:00Z60,792.00011.57532.07443.080
2024-08-04T06:00:00Z60,373.99010.90132.89643.590
2024-08-04T08:00:00Z60,708.00010.21232.53044.207
2024-08-04T10:00:00Z60,896.00012.30131.01944.135
2024-08-04T12:00:00Z60,822.01012.92930.06943.830
2024-08-04T14:00:00Z59,086.01010.66441.62644.929
2024-08-04T16:00:00Z57,864.4308.77149.11746.698
2024-08-04T18:00:00Z59,257.6608.99242.61848.016
2024-08-04T20:00:00Z58,459.9808.81138.74749.083
2024-08-04T22:00:00Z58,161.0008.08138.13850.222
2024-08-05T00:00:00Z54,432.6505.48556.38852.511
2024-08-05T02:00:00Z53,890.8705.15352.97054.637
2024-08-05T04:00:00Z52,718.0004.54953.45456.757
2024-08-05T06:00:00Z52,674.1903.70958.49058.994
2024-08-05T08:00:00Z52,667.8004.05254.59060.935
2024-08-05T10:00:00Z51,340.0003.68654.61762.823
2024-08-05T12:00:00Z51,951.0003.22452.34164.649
2024-08-05T14:00:00Z54,321.09012.54546.04864.116
2024-08-05T16:00:00Z54,707.99014.09242.70363.134
2024-08-05T18:00:00Z53,470.09012.90143.83362.519
2024-08-05T20:00:00Z54,372.01013.91540.84561.566
2024-08-05T22:00:00Z54,018.81013.24138.86660.681
2024-08-06T00:00:00Z55,723.98016.72535.31158.898
2024-08-06T02:00:00Z55,665.73016.31634.44757.242
2024-08-06T04:00:00Z55,925.97015.79334.27555.790
2024-08-06T06:00:00Z55,999.99016.05433.18054.290
2024-08-06T08:00:00Z55,211.99014.95434.77053.259
2024-08-06T10:00:00Z55,210.01014.55033.83152.301

Between the two marked observations, the close falls 17.09% while ADX rises from 37.18 to 62.82. The negative DI line dominates at the later observation. This selected historical episode makes the direction/strength distinction visible.

The indicator is doing its stated job. A growing imbalance in favor of −DI can raise ADX. Treating every upward ADX slope as a buy signal discards the part of the display that tells you the direction.

The chart contains locally calculated indicator values from recorded candles. It shows no trading fills and makes no claim about what happens after the selected decline.

What happens when ADX smoothing changes?

We used a deliberately simple long-only rule: enter when +DI is above −DI and ADX meets a chosen threshold; exit when −DI becomes larger. A second version also required ADX to be higher than its preceding reading at entry.

Recorded backtest metrics The same strength threshold, different timing

Directional lookback 14 and strength threshold 25 stay fixed. Change only ADX smoothing; the two entry conditions respond differently.

The value table below is available without JavaScript.

Chart data
Data and calculation details
This view selects a representative example; the chart-data download retains the full comparison. Source: Recorded TrainBard fixed-quote activity controls. Representative BTCUSDT two-hour 2021–2023 sample. Every buy or sell is one execution. Script requests 100 quote units per entry via 100 divided by the signal close, with 500 startup bars and 0.1% cost. No local fills are generated. All eight frame curves and exact source mappings remain in replications and the evidence download.
Accessible value table (24 observations)
ObservationExecuted entries and exits · ADX above 25Executed entries and exits · ADX above 25 and rising
2352.000344.000
3336.000318.000
4338.000298.000
5332.000284.000
6342.000270.000
7352.000264.000
8364.000258.000
9370.000248.000
10370.000246.000
11378.000238.000
12388.000236.000
13394.000230.000
14394.000232.000
15406.000232.000
16414.000234.000
17420.000232.000
18428.000228.000
19432.000226.000
20438.000224.000
21438.000224.000
22446.000224.000
23454.000224.000
24458.000228.000
25464.000228.000

In the displayed control, extending ADX smoothing from 2 to 14 to 25 changed threshold-only executions from 352 to 394 to 464. With the rising condition added, the same settings gave 344 to 232 to 228. The longer smoothing made one version busier and the other quieter. Increasing smoothing from 2 to 25 raised threshold-only activity and reduced rising-gated activity in all eight samples. Exact replications remain in the evidence.

More smoothing changes the path by which ADX approaches and leaves a threshold. It can preserve an old strength reading longer as well as delay a new increase. Counting eligible trades therefore requires the whole rule and price history; the word “slower” does not determine the count. Strength persisting through a change of direction is an established ADX behavior, also illustrated in the StockCharts reference. These experiments measure how that memory interacts with the two specified entry conditions.

The rising condition also has a specific role in this experiment. It qualifies an entry, while the exit still depends on the DI lines. It does not exit a trade merely because ADX begins falling. An alternative that exits on falling ADX would be a different strategy.

Does requiring a rising ADX improve the rule?

The matched main-study comparisons include both higher and lower historical returns after adding the rising condition. A stronger entry requirement was not a universal improvement. One recorded entry in a separate control with DI length 14 and ADX smoothing 25 qualified with ADX 33.11, above 25 but down from 34.39, after recent negative-DI dominance. A high strength reading can persist as direction changes; requiring a positive slope asks an additional question. The selected fill and indicator check remain in the evidence.

A filter can remove early entries, postpone others within the same directional episode, and skip an episode entirely. Those changes affect both participation and risk. A better-looking top row does not tell us that the filter improved the surrounding settings.

For a practical comparison, keep DI length and the strength threshold fixed, compare both entry conditions, and then inspect nearby smoothing lengths. Check total return and drawdown alongside activity. ADX describes recent directional movement; it does not guarantee that the next move continues it.

Reproduce the comparison

The script exposes the directional lookback, ADX smoothing, threshold, and optional rising condition. It implements this limited DMI/ADX adaptation rather than Wilder’s complete trading method.

Pine Script v6
Open editor

//@version=6
strategy("ADX directional strength research", overlay=false, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=99, process_orders_on_close=false)
di_length = input.int(14, "Directional length", minval=2)
adx_smoothing = input.int(14, "ADX smoothing", minval=2)
threshold = input.int(25, "ADX threshold", minval=1)
require_rising = input.int(0, "Require rising ADX", minval=0, maxval=1)
[plus_di, minus_di, adx] = ta.dmi(di_length, adx_smoothing)
ready = bar_index >= 500
enter = plus_di > minus_di and adx >= threshold and (require_rising == 0 or adx > adx[1])
leave = plus_di < minus_di
if ready and strategy.position_size == 0 and enter
    strategy.entry("Long", strategy.long)
if ready and strategy.position_size > 0 and leave
    strategy.close("Long")
plot(plus_di, title="Positive DI", color=color.aqua)
plot(minus_di, title="Negative DI", color=color.orange)
plot(adx, title="ADX", color=color.purple)
hline(25, title="Common trend threshold")
Settings, accounting, and reproducibility

The main study contains 99,456 accepted valid evaluations across Binance Spot BTCUSDT and ETHUSDT, two- and four-hour candles, and the date inputs 2021-01-01–2023-12-31 and 2024-01-01–2025-12-31. Every dataset uses the same grid: directional lengths 4–40; ADX smoothing lengths 2–25; thresholds 10, 15, 20, 25, 30, 35, or 40; and both entry-gate choices. That is 12,432 settings per dataset. The 49,728 paired rising-gate comparisons share every other parameter. These are related retrospective evaluations, not independent statistical trials or blind holdouts.

Every main evaluation started with 10,000 USDT and remained in cash for the first 500 bars. It was long-only with no leverage, no yield on idle cash, and a requested combined fee/slippage of 0.1% per execution. The scripts request 99% equity sizing, evaluate completed-candle conditions and use next-open market orders. This requested percentage does not guarantee a persistent 1% cash reserve across repeated trades. Sizing and costs can change which later signals become recorded executions. Recorded results follow the platform’s fee and fill model; small fixed-quote controls test the activity comparisons separately. A remaining position is valued at the last close.

A selected end date includes the candle opening at 00:00 UTC on that date, rather than the entire final calendar day. Five hundred startup bars cover different elapsed time on two- and four-hour charts. The platform’s first-close to last-close holding return includes that startup and excludes trading costs. Separate recorded passive controls match startup, requested size and entry cost; the shared audit preserves them. Positive strategy return is not the same as beating either holding comparator.

Historical comparisons use the candles returned by TrainBard. An independent check against checksum-verified official monthly archives found exact agreement in the later window and small earlier-window differences, preserved in the shared source audit. Public historical indicator examples use the verified later window. No locally reconstructed trading simulation supplies any performance result.

Accepted evidence combines the completed MCP frames with the remaining frames completed through TrainBard’s web interface. Original web exports, completed count displays, screenshots and exact source checksums remain in the archive. Every missing web-export tuple must reconcile with the completed zero-execution count. Such tuples supply an execution count of zero for activity comparisons; no absent return, drawdown, win-rate or fee value is invented. Return comparisons use pairs for which both portfolio metrics were actually returned.

The main tables contain 99,456 rows with executions and 0 zero-execution configurations. Original result membership, exact parameter grids, unique tuples, capital, fees, finite metrics and completion counts were verified. Four executable diagnostic settings and 384 fixed-quote activity-control settings are excluded from the main count. Controls fix DI length 14 and threshold 25 while changing ADX smoothing and the rising gate. An explicit quantity of 100 divided by the signal close supplies a small quote budget; next-open prices can make the actual entry value slightly different.

The activity data retain every control dataset; the visible panel selects a representative comparison and uses a zero-based execution axis. A buy and a sell are two executions. A condition seen while already holding does not add another long entry. Published return comparisons are recorded main-study metrics under the requested sizing model; they are not a signal-only counterfactual.

The historical chart recalculates DI14/ADX14 with Wilder averages seeded from fourteen nonmissing observations, using checksum-verified official BTCUSDT two-hour candles from 2024–2025. It selects a 24-bar decline with ADX gaining at least 15 points and terminal −DI dominance, then shows surrounding context. This selection explains the calculation; it does not estimate how often the pattern occurs. No local trading simulation supplies any result.

Download the tested script, fixed-quote control script, accepted study evidence, historical-chart provenance, and shared execution and candle audit. Exact sanitized requests, original responses, complete sweep tables and hashes remain in the research archive.

Original TrainBard completion for a DMI and ADX comparison batch.

This original UI completion covers 24,864 settings on the later ETHUSDT two- and four-hour frames. It is one component of the full study; the best displayed row is not a recommended setting.

For another view of smoothing and triggers, see the MACD guide. For a direct measure of movement size, see the ATR guide.