Indicators · Trend and moving averages
Directional Movement Index (DX, +DI, −DI): a hand calculation
How Wilder’s directional movement, true range, +DI, −DI and DX are calculated, worked bar by bar on JPMorgan Chase, and why raw DX is too noisy to use alone.
On this page
The Directional Movement Index, usually written DX, is the raw ingredient of Wilder's trend-strength system. It answers one question each bar: over the last two weeks, how lopsided has the battle between upward and downward price pushes been? It is built from two companion lines, the plus and minus directional indicators (+DI and −DI), which many platforms bundle together under the name DMI.
Few traders use DX on its own. It jumps around far too much. But it is worth understanding, because every ADX and ADXR reading is a smoothed version of it, and because the +DI and −DI lines it is built from are the only part of Wilder's system that tells you direction. This guide calculates every piece by hand on a real JPMorgan Chase bar and shows, on a year of data, why the smoothing that turns DX into ADX is necessary.
The building blocks
Directional movement. Compare today's bar with yesterday's.
- Up move = today's high − yesterday's high.
- Down move = yesterday's low − today's low.
- If the up move is larger and positive, it counts as +DM and −DM is zero.
- If the down move is larger and positive, it counts as −DM and +DM is zero.
- An inside day (lower high and higher low) gives zero to both.
Only one side can score on any day. That is Wilder's way of asking which side was in control.
True range. The day's range, extended to include any gap from the previous close: the largest of high − low, |high − previous close| and |low − previous close|. True range is also the basis of the Average True Range.
The formula
Because both DIs are divided by the same smoothed TR, they are percentages of the same total movement. They do not need to add up to 100; the rest of the true range is movement that was not directional, such as inside days and overlaps.
A worked example on JPMorgan Chase
On April 7, 2026 JPMorgan Chase (JPM) had a high of $298.18, a low of $292.70 and a close of $297.40. The next day, April 8, it gapped up and traded between $305.33 and $311.26. Here is the full calculation for April 8.
| Step | Calculation | Result |
|---|---|---|
| Up move | 311.26 − 298.18 | 13.08 |
| Down move | 292.70 − 305.33 | −12.63 |
| +DM | up move is larger and positive | 13.08 |
| −DM | 0 | |
| TR | largest of 5.93, 13.86 (high − prev close), 7.93 | 13.86 |
Now the smoothing. The running totals at the end of April 7, recomputed from Finabase's daily bars, were TR 96.533, +DM 22.054 and −DM 24.535.
| Step | Calculation | Result |
|---|---|---|
| Smoothed TR | 96.533 − 96.533 ÷ 14 + 13.86 | 103.498 |
| Smoothed +DM | 22.054 − 22.054 ÷ 14 + 13.08 | 33.559 |
| Smoothed −DM | 24.535 − 24.535 ÷ 14 + 0 | 22.783 |
| +DI | 100 × 33.559 ÷ 103.498 | 32.42 |
| −DI | 100 × 22.783 ÷ 103.498 | 22.01 |
| DX | 100 × (32.42 − 22.01) ÷ (32.42 + 22.01) | 19.13 |
Finabase's DX (14) for JPM on April 8 is 19.13. The day before, with +DI at 22.85 and −DI at 25.42, DX was 5.32. One strong gap day flipped which DI was on top and nearly quadrupled DX, while the ADX barely moved, from 20.90 to 20.77.
DX on a real chart
JPMorgan's year was mostly trendless by Wilder's measure. The stock ranged from a low close of $282.84 on March 27 to a high close of $365.18 on August 12, ending at $343.58, and its ADX was below 20 on 150 of 251 sessions.
In that environment DX was erratic. Over the 190 sessions shown, it changed direction 72 times; the ADX changed direction 43 times. DX touched 53.9 on June 17 and 0.8 on October 13. On September 22 it jumped from 5.8 to 33.1 in a single day. A rule that acted on DX crossing 25 would have traded constantly.
The DI lines told the same story. Between February and October they crossed 21 times, and many crossings reversed within days: +DI crossed above −DI on July 15, under on July 17, over on July 22 and under again on July 29.
How traders use DX and the DIs
The DIs for direction. +DI above −DI says upward pushes have dominated the last two weeks; −DI above, downward. Wilder's original system entered on DI crossovers. Most practitioners now require ADX to be above 20 or 25 before acting on a cross, which would have filtered out nearly all of JPMorgan's 2026 crossings.
DX as the raw input. DX itself is mainly useful for understanding what ADX and ADXR are doing. When ADX starts rising, a look at DX shows whether that is due to a burst of one-sided days or a steady build.
The extreme-point rule. Wilder paired the DI crossover with a stop at the extreme price of the crossover day. If a cross reversed but price did not breach that extreme, he stayed in the trade. That rule is a useful defence against the whipsaws shown above.
Pitfalls and limitations
Noise. As JPMorgan shows, raw DX is too jumpy to trade on its own.
Gaps dominate. True range includes gaps, and directional movement is measured from the prior bar's extremes, so one gap can swing both DIs and DX sharply, as on April 8.
Warm-up. The running totals need a few dozen bars to settle. Different start dates give slightly different early values. Finabase computes from a longer history than the visible range, so the plotted DX is already settled.
DX compared with its relatives
| Line | Formula in one line | Direction? | Changes of direction on JPM (190 sessions) |
|---|---|---|---|
| +DI | Smoothed +DM ÷ smoothed TR | Up side | — |
| −DI | Smoothed −DM ÷ smoothed TR | Down side | — |
| DX | Gap between DIs ÷ their sum | No | 72 |
| ADX | Wilder average of DX | No | 43 |
| ADXR | Average of ADX now and 13 bars ago | No | — |
See Average Directional Index (ADX): measuring trend strength for how ADX is read and ADXR (Average Directional Movement Rating): what it adds for the ADXR.
How Finabase calculates and scores DX
Finabase computes DX with TA-Lib's DX function on each bar's high, low and close, using
the Wilder smoothing shown above. A new DX study (listed as "Directional Movement")
defaults to 14 periods and is drawn in its own panel below the price chart.
DX (14) is listed in the technical gauge with its latest value and carries no Buy or Sell rule, so it always counts as neutral. Like the ADX, it measures how one-sided movement has been, not which way, so it cannot be scored as bullish or bearish by itself. Finabase does not plot +DI and −DI as separate studies; this page's chart recomputes them from the same bars to show how DX is formed.
Frequently asked questions
What is the difference between DX and ADX?
DX is the raw daily reading of how one-sided directional movement has been. ADX is a 14-period Wilder average of DX. On JPMorgan's 2026 chart DX changed direction about two-thirds more often than ADX.
What do +DI and −DI mean?
They are the shares of recent true range that came from upward pushes (+DI) and downward pushes (−DI). The higher line shows which side has been in control over the look-back period.
Can DX be used as a trading signal?
Rarely on its own: it is too noisy. Its value is as the input to ADX and ADXR, and the DI lines it is built from give the direction that ADX lacks.
Summary
DX condenses Wilder's directional movement into a 0–100 measure of how one-sided the market has been, built from +DM, −DM, true range and the two DI lines. The JPMorgan example shows every step to the cent, and a year of its data shows why DX needs smoothing: 72 changes of direction in 190 sessions. Use the DIs for direction, the ADX for strength, and DX to understand what drives them.
Sources and further reading
- J. Welles Wilder Jr., New Concepts in Technical Trading Systems (Trend Research, 1978) — directional movement, true range and DX
- TA-Lib — DX, PLUS_DI, MINUS_DI and TRANGE function reference
- Finabase chart data — JPM daily bars, 2025-10-30 to 2026-10-29, DX and ADX computed by Finabase; +DI and −DI recomputed from the same bars