The Directional Movement Index: how +DI and −DI are calculated and how to read them
+DI and −DI: what the directional movement lines show on a chart
+DI and −DI are J. Welles Wilder’s two directional lines: +DI measures how much of the range of the last 14 sessions is made of rising highs, −DI how much is made of falling lows. They are read together: when +DI is above −DI the upward push weighs more, when it is below the downward push does; with the ADX they form the Directional Movement Index, or DMI.
What the ADX measures, the strength of a move, is covered in the lesson on the ADX. This page is about the two lines it comes from: how they are calculated session by session, the calculation redone on real sessions, what a crossover means and why the lines tangle up when the market has no direction.
InteractiveClick a session, on the price or on the panel: the page gives you the pieces of that day’s calculation (+DM, −DM, true range) and the two lines.
How are +DI and −DI calculated?
It all starts from two neighbouring sessions. You check how far today’s high is above yesterday’s and how far today’s low is below yesterday’s: the larger of the two is the session’s directional movement, +DM if it is the high, −DM if it is the low. The other one counts as zero.
Fig. 1 · The four kinds of session in directional movement
- The high rises more than the low falls: +DM counts. The difference between the two highs is the session’s movement; −DM is zero.
- The low falls more than the high rises: −DM counts. Same rule on the other side; +DM is zero.
- A session entirely inside yesterday’s: zero and zero. Neither the high nor the low breaks out, and for Wilder that session has no directional movement.
- A session that breaks out on both sides: the larger one wins. Only the bigger movement is kept, the other is set to zero. If they are equal, both are zero.
The movement is compared with the session’s real range, the true range: the same building block Wilder uses for the ATR. It is the largest of three measures, so a gap between one session and the next is not lost.
Fig. 2 · True range: three measures, the largest one counts
- A normal session: high minus low. When yesterday’s close is inside today’s session, the true range is the candle’s range.
- A gap up: high minus yesterday’s close. The size of the gap enters the calculation too.
- A gap down: yesterday’s close minus low. The same thing on the other side.
Fig. 3 · +DI and −DI: two shares of the same range
- The last 14 sessions are added up. True range, +DM and −DM become three totals, smoothed the Wilder way.
- +DI is the +DM total divided by the true range total, times 100. −DI is the same calculation with −DM.
- Together they do not make 100. Each session gives one movement only, and the movement never exceeds the true range: the rest is range that pushed nowhere.
As a formula: +DI = 100 × +DM14 ÷ TR14 and −DI = 100 × −DM14 ÷ TR14. The number after the symbol is the period: 14 sessions is the one Wilder used.
The +DI and −DI calculation, step by step
Here is the real calculation on the first sessions in the PayPal file, from . For each session: high, low and close, then the true range, +DM and −DM. The first 14 values are added up and give the three starting totals.
| Session | High | Low | Close | True range | +DM | −DM |
|---|---|---|---|---|---|---|
| 108.61 | 106.21 | 106.50 | – | – | – | |
| 108.98 | 107.04 | 108.48 | 2.48 | 0.37 | 0.00 | |
| 111.37 | 109.26 | 111.20 | 2.89 | 2.39 | 0.00 | |
| 111.41 | 109.37 | 109.80 | 2.04 | 0.04 | 0.00 | |
| 110.51 | 103.66 | 105.19 | 6.85 | 0.00 | 5.71 | |
| 104.71 | 101.08 | 102.81 | 4.11 | 0.00 | 2.58 | |
| 104.24 | 102.87 | 103.78 | 1.43 | 0.00 | 0.00 | |
| 107.67 | 105.25 | 106.85 | 3.89 | 3.43 | 0.00 | |
| 107.04 | 105.01 | 106.75 | 2.03 | 0.00 | 0.24 | |
| 107.76 | 105.75 | 106.27 | 2.01 | 0.72 | 0.00 | |
| 107.65 | 106.21 | 107.25 | 1.44 | 0.00 | 0.00 | |
| 107.55 | 103.49 | 105.36 | 4.06 | 0.00 | 2.72 | |
| 106.77 | 105.36 | 105.88 | 1.41 | 0.00 | 0.00 | |
| 105.22 | 103.67 | 104.40 | 2.21 | 0.00 | 1.69 | |
| 105.08 | 104.11 | 104.87 | 0.97 | 0.00 | 0.00 | |
| Sum of the 14 | 37.82 | 6.95 | 12.94 |
From the next session on, the totals are not rebuilt from scratch: one 14th is taken off and the new value is added. On , for the true range: 37.82 − 2.70 + 3.37 = 38.49. With +DM the same step gives 6.45, and +DI = 100 × 6.45 ÷ 38.49 = 16.8. The numbers are rounded to the cent; the page works with them in full.
| Session | TR14 | +DM14 | −DM14 | +DI | −DI |
|---|---|---|---|---|---|
| 37.82 | 6.95 | 12.94 | 18.4 | 34.2 | |
| 38.49 | 6.45 | 13.64 | 16.8 | 35.4 | |
| 38.65 | 5.99 | 13.84 | 15.5 | 35.8 | |
| 37.54 | 5.97 | 12.85 | 15.9 | 34.2 | |
| 38.92 | 5.55 | 14.04 | 14.3 | 36.1 |
Wilder’s smoothing is an exponential average that gives the new value a weight of 1/14: slower than the usual exponential average over the same period, which gives it 2/(14+1). The two averages are compared on the EMA vs SMA page. It is the same smoothing Wilder uses in the RSI.
What does a +DI and −DI crossover mean?
A crossover is the session in which the line on top changes. When +DI moves above −DI, over the last 14 sessions the upward push has started to weigh more than the downward push; when −DI moves above, the opposite.
Fig. 4 · The crossover comes after the price turns
- Price makes its low first. The lines are smoothed totals over 14 sessions: they need a few rising sessions before they swap places.
- Then +DI moves above −DI. The amber circle is the crossover: it says the balance has shifted, not where price will go.
- The high of the crossover day. This is Wilder’s extreme point, the dashed amber line: in his system it served as the reference price.
1+DI above −DI
- Over the last sessions the upward push has weighed more.
- The further apart the lines, the more decisive the move has been.
2−DI above +DI
- The downward push has weighed more.
- It does not say how far price will fall: it says how things went.
3The crossover
- The line on top changes.
- On the crossover day the lines are close and the DX is almost zero.
In his 1978 book Wilder builds a complete system on the crossover, with the extreme point rule: on the crossover session you note the high, or the low when −DI is the one moving above, and that becomes the reference price. The rule is told here to explain where the habit of watching crossovers comes from, not as something to follow.
In 2020, the two 14-session lines of PayPal crossed 12 times: 6 upward, 6 downward. −DI stayed on top for at most 30 sessions in a row, from to ; +DI for 68 sessions, from to . In 4 cases a crossover came three sessions or fewer after the previous one.
How do +DI, −DI and the ADX relate?
The two lines say which side the move leans to; the gap between them says by how much. Wilder calls the gap between +DI and −DI divided by their sum, times 100, the DX, the directional movement index. The ADX is the DX smoothed with the same average: that is why it rises when the lines move apart, in either direction, and falls when they come together.
Fig. 5 · From the gap between the lines to the DX
- Lines far apart: high DX. Almost all the movement has been on one side.
- Lines crossing: DX at zero. Where they touch the gap is nil, and so is the DX.
- Far apart again, the other way round: the DX rises again. The DX has no sign: it does not know which line is on top.
| +DI | −DI | Gap | Sum | DX |
|---|---|---|---|---|
| 30 | 10 | 20 | 40 | 50.0 |
| 25 | 20 | 5 | 45 | 11.1 |
| 22 | 22 | 0 | 44 | 0.0 |
| 12 | 36 | 24 | 48 | 50.0 |
The DX jumps from one session to the next; the ADX, which smooths it, is easier to read. Why the ADX measures strength and not direction, and how its threshold is used, is explained in the lesson on the ADX.
Fig. 6 · With no direction, the lines tangle up
- In the sideways stretch the two lines keep swapping places. Each amber circle is a crossover.
- Meanwhile the ADX stays low. The lines are always close, the DX does not rise and neither does its average.
- When a trend starts the lines separate and the ADX rises. The crossovers stop.
On PayPal it shows in the numbers: on the 2020 crossover days the DX does not go above 15.7; on , the session with the lines furthest apart, it is 60.4.
Interactive exerciseYour turn: find the +DI and −DI crossovers
PayPal, 2020: the lines over 14 sessions, without the crossovers marked- Click a session in which +DI moves above −DI: an upward crossover.
- Now one in which −DI moves above +DI: a downward crossover.
- Finally, the session in which the two lines are furthest apart.
The criteria. A crossover is a session in which the line on top is not the one of the day before: upward if +DI is on top today, downward if −DI is. In the first two questions the answer is right if 1) the session has both lines; 2) it is a crossover; 3) in the direction asked. In the third it is right if the gap between the lines is at least 90% of the widest gap in the period. A click takes, among the session clicked and the 2 before and after it, the one that best answers the question. These are this page’s rules, written down so that every answer can be checked.
No answer yet. Look in the panel for a point where the green line moves above the red one.
What +DI and −DI do not tell you
The two lines describe past sessions, smoothed. They have three limits worth keeping in mind when you read them.
1They come late
- They are smoothed totals: the crossover always comes after the price turns.
- The longer the period, the later it comes.
2They tangle up in sideways markets
- With no direction the lines stay close and swap places often.
- That is where a low ADX helps to read them: they say little.
3They depend on the period
- Over 7 sessions crossovers multiply, over 21 they thin out: try it with the buttons at the top.
- No period is the right one: 14 is Wilder’s choice.
One last thing: the values also depend on where the calculation starts, because the smoothing carries all past sessions with it. That is why here the calculation starts a few months before the period shown, and two platforms can give slightly different numbers on the same session.
Deeper dives: the ADX · the RSI, Wilder’s other indicator · the trend · EMA vs SMA.
Where to go from here
The indicators · Trend and ranges«ADX» and its deeper dives
ADX
- It measures how much strength a move has, not which way it goes.
- It is built from +DI and −DI, the two direction lines.
- Above the threshold the move is decisive; below it, price goes back and forth.
Frequently asked questions
What is the Directional Movement Index?
The Directional Movement Index, or DMI, is J. Welles Wilder’s system of two lines, +DI and −DI, usually shown together with the ADX. +DI measures the upward push of the last sessions, −DI the downward push: the line on top tells you which side the move leans to.
How are +DI and −DI calculated?
For each session you measure how far the high exceeds yesterday’s high (+DM) and how far the low falls below yesterday’s low (−DM), keeping only the larger one. They are smoothed over 14 sessions together with the true range: +DI is 100 times the smoothed +DM divided by the smoothed true range, −DI the same with −DM.
What does it mean when +DI crosses −DI?
It means that over the last sessions the upward push has started to weigh more than the downward push; the opposite crossover says the reverse. It measures what has already happened: it comes after the price turns, and in markets with no direction it happens often.
What is the difference between the DMI and the ADX?
+DI and −DI give the direction of the move, the ADX its strength. The ADX comes from the two lines: it is the smoothed average of the gap between them divided by their sum, and so it has no sign.
What period is used for +DI and −DI?
Wilder used 14 sessions, and it is still the most common setting. A shorter period makes the lines cross more often, a longer one makes them slower.
Method and sources
| Source |
|---|
| J. Welles Wilder, New Concepts in Technical Trading Systems, Trend Research, 1978: directional movement, true range, +DI, −DI, DX and ADX, the smoothing and the extreme point rule. |
The PayPal prices run from to : daily sessions from our end-of-day archive, adjusted for dividends and corporate actions, so the levels do not match the quotes read at the time. The chart shows the sessions from ; the 84 before it are the warm-up for the smoothing. All calculations use prices rounded to the cent, the same ones the page uses in the browser. A crossover is a session in which the line on top changes, over 14 sessions; at every update the page checks that the rule finds the same crossovers and the same session with the widest gap. The numbered figures are diagrams drawn to explain, not prices. This guide explains how the tools work: it does not contain investment recommendations and promises no returns. Our method · license · report an error.
DOMINA’s stock pages, indices and commodities are rebuilt every night. Leave your email: we write to you when the picture changes.
No third-party advertising. Unsubscribe with one click. Go to the platform →With your consent we use Google Analytics cookies to count visits. If you decline, the page works the same and no measurement cookie is set. Cookie policy