Average Directional Movement Index Calculator
The average directional movement index, ADX, is J. Welles Wilder’s trend-strength gauge: it reads from 0 to 100 and says how one-sided price movement has been, never which side. This calculator runs the complete Wilder calculation on a series you paste in: directional movement and true range per bar, Wilder smoothing, +DI and -DI, DX, and ADX itself, seeded and smoothed exactly as Wilder defined it.
Paste one bar per line as High, Low, Close (dates and an Open column are accepted) and set the period, 14 by default. The pre-filled 30-bar teaching series returns ADX 51.80 on its final bar, with +DI 20.21 above -DI 3.38: a strong trend with the upward side in control. An audit table under the result prints every period’s workings.
| Bar | +DM | -DM | TR | +DI | -DI | DX | ADX |
|---|
Wilder seeding, stated plainly: first +DI and -DI appear at bar 15 (period + 1), from plain sums of the first 14 periods; first ADX at bar 28 (2 x period), the average of the first 14 DX values. Readings keep seasoning with more history (StockCharts: roughly 150 periods).
Quick Answer
Key takeaways
- ADX needs a run of bars, not a pair: the minimum is 2 x the period, because the smoothing must seed before DX can be averaged into ADX.
- Only the larger directional move counts each bar; the loser is zeroed, and a tie zeroes both, which is why choppy series pull ADX down.
- Wilder smoothing is a recursion, not a simple average: each smoothed value drops one period-th of itself and adds the new bar, so averaging tools will not match platform ADX.
- ADX states strength, the DI lines state direction: +DI 20.21 over -DI 3.38 makes the worked series’ strong trend an upward one.
- Quick Answer
- How the Wilder ADX build works, stage by stage
- Worked example: thirty bars from range to strong trend
- What to paste in: formats the parser accepts
- Reading ADX and the DI lines without fooling yourself
- What competing calculators and guides miss
- Frequently asked questions
- Add This Calculator to Your Website
- References
How the Wilder ADX build works, stage by stage
Wilder published the directional movement system in 1978 in “New Concepts in Technical Trading Systems”, and every platform implementation still runs these five stages. This calculator runs all five on your whole series and prints each stage in the audit table.
Measure the two moves. Up-move is current high minus previous high; down-move is previous low minus current low. Bar 2 of the worked series: 140 minus 110 is 30 up; 90 minus 120 is -30 down.
Keep only the winner. The larger positive move becomes that bar’s directional movement; the other becomes zero, so bar 2 scores +DM 30.00 and -DM 0.00. Negative or exactly equal moves score zero on both sides.
Compute the true range. The largest of the current range and the two gaps from the previous close to the current high and low. Bar 2: max(20, 40, 20) is 40.00, the gap term doing the work.
Smooth, then turn movement into percentages. The first smoothed values, at bar 15 for period 14, are plain sums of bars 2 to 15: true range 455.00, +DM 150.00, -DM 50.00. So +DI is 150 / 455 x 100 = 32.97 and -DI is 10.99. Later bars update each value as: prior minus prior / 14, plus the new bar.
Build DX, then smooth it into ADX. DX at bar 15 is |32.97 – 10.99| / (32.97 + 10.99) x 100 = 50.00. The first ADX, at bar 28, averages DX for bars 15 to 28: 48.85. Each later ADX is ((previous ADX x 13) + current DX) / 14, carrying the series to 50.29 at bar 29 and 51.80 at bar 30.
Worked example: thirty bars from range to strong trend
The calculator is pre-filled with the 30-day teaching series published with the MQL5 guide to designing a trading system by ADX: wide early ranges, a soft patch in the middle, then highs that keep expanding while lows stop falling. At the default period 14 the milestones land here:
| Milestone | Bar | Values |
|---|---|---|
| One bar inside the machine | 2 | +DM 30.00, -DM 0.00, true range 40.00 |
| First directional readings (seeded) | 15 | +DI 32.97, -DI 10.99, DX 50.00 |
| First ADX (average of DX, bars 15-28) | 28 | ADX 48.85 |
| Second ADX (recursion) | 29 | ADX 50.29, DX 69.10 |
| Final bar | 30 | +DI 20.21, -DI 3.38, DX 71.35, ADX 51.80 |
| Reading | 30 | Strong trend, upward direction |
Two details in the audit table are worth noticing. First, the middle bars are genuinely two-sided: at bars 16 and 17 the down-move wins (-DM 15.00 and 10.00), the DI lines narrow, and DX dips to 31.72. From bar 19 on, every -DM is 0.00 while +DM prints 10 to 15 a bar, so DX climbs to 71.35 and ADX follows to 51.80. Second, +DI falls from 32.97 to 20.21 over the same stretch even as the trend strengthens: widening ranges (true range reaches 106.00 on the final bar) dilute +DI, while DX rises because the movement stays one-sided. That split is why ADX, not +DI, is the strength gauge.
What to paste in: formats the parser accepts
One bar per line, oldest first, as High, Low, Close, with commas, spaces, tabs or semicolons as separators. A leading date column, an Open column (read as Open, High, Low, Close), and a header row are accepted, so a spreadsheet export pastes in unchanged; ADX uses the high, low and close only. The parser names its problems instead of guessing: an unreadable line is reported by line number, a bar whose high sits below its low by bar number, and a short series is rejected with the count needed (28 bars at period 14). Shorter periods react faster and whipsaw more; longer ones lag more.
Reading ADX and the DI lines without fooling yourself
The conventional bands come from Wilder’s own guidance, as carried by StockCharts ChartSchool and the Fidelity Learning Center guide to ADX. They describe strength only, never direction.
| ADX | Reading | Common response |
|---|---|---|
| Under 20 | Weak or no trend | Trend systems stand aside; range methods get a turn |
| 20 to 25 | Grey zone | Wait for a DI cross with ADX rising |
| 25 to 40 | Trend present | Trend-following entries in their normal zone |
| Over 40 | Strong trend | Best odds for trend following; late entries chase |
Two traps recur. First, ADX rises in strong downtrends exactly as in strong uptrends, so a rising ADX is not a buy signal; direction must come from +DI versus -DI or from price itself. Second, ADX peaks after the trend’s best segment, because double smoothing is deliberately slow: a fall from 60 to 45 says the trend is less one-sided, not over.
If a trend signal led to a trade, an average execution price calculator grades the fills themselves. For a position already held, an active return calculator and a portfolio performance calculator keep performance honest, and exit sizing connects to the stock sell calculator when a weakening ADX argues for trimming.
What competing calculators and guides miss
The only other free calculator for this keyword takes no prices at all. It asks you to type in +DI and -DI, computes DX, then divides DX by the period and calls the result ADX: its own worked example turns DX 20 at period 14 into “ADX 1.43”. Dividing by the period is not Wilder smoothing; it shrinks every reading toward zero, and leaves you to produce +DI and -DI, most of the work, elsewhere.
Winning move 1: the full pipeline runs from raw prices. Directional movement, true range, Wilder smoothing, both DI lines, DX and the seeded-then-smoothed ADX all happen here, on the series you paste. Nothing needs pre-computing on a platform.
Winning move 2: every intermediate is printed, per period. The audit table shows +DM, -DM, true range, +DI, -DI, DX and ADX for every bar from the first DI onward, so any row can be checked against Wilder’s definitions in seconds. Ranking guides hide key arithmetic in formula images and screenshots, and one developer guide prints a tie bar as +DM 1, when Wilder’s rule zeroes both moves.
Winning move 3: the warmup is enforced and disclosed, not hidden. The tool refuses a series shorter than 2 x the period, states how its first DI and ADX are seeded, and flags the roughly 150-bar seasoning StockCharts describes. Several online code examples quietly smooth with a plain average instead of Wilder’s recursion, drifting from platform values without saying so.
Frequently asked questions
The full Wilder system from a pasted price series: +DM, -DM and true range per bar, Wilder-smoothed +DI and -DI, DX from the first DI onward, and ADX, seeded as the average of the first period of DX values, then updated with Wilder’s recursion. The headline is the final bar’s ADX, +DI, -DI and DX; the audit table shows every period.
At least twice the period: 28 bars at period 14. Fourteen bars of directional movement seed the first +DI and -DI, and fourteen DX values seed the first ADX. More history is better: the seed is a finite sum, and StockCharts notes roughly 150 periods produce fully seasoned values.
One bar per line, as High, Low, Close, separated by commas, spaces or tabs: for example 110, 90, 100. A leading date column, an Open column and a header row are all accepted, so a spreadsheet export pastes in unchanged. ADX uses the high, low and close only, and the calculator reports the exact line or bar it cannot use.
Fourteen is Wilder’s original period from his 1978 book and the default on every major platform, which keeps readings comparable with published values. Shorter periods react faster and whipsaw more; longer ones lag more. The field accepts 2 to 100, and the minimum series length scales with it: twice the period.
Wilder smoothing is a recursion: each new smoothed value is the previous value, minus one period-th of itself, plus the new bar. The first smoothed value is a plain sum of the first period of bars. A simple moving average weights only the last period of bars equally and drops the rest, producing different values. Several code examples online quietly use the average and drift from platform figures.
By Wilder’s convention, carried by StockCharts and Fidelity: under 20 means no meaningful trend, 20 to 25 is a grey zone, above 25 a trend is present, and above 40 it is strong, with readings over 60 rare. The bands describe strength only: a strong downtrend produces a high ADX exactly as a strong uptrend does, so direction comes from which DI line is on top.
Almost always history length. Platforms compute ADX over months or years of bars, so their seed washed out long ago; a 30-bar paste sits close to its seed, and its ADX moves if you add older bars in front. Variants matter too: tools that smooth with a simple average, or seed differently, will not match a Wilder implementation.
No. ADX is direction-blind by design: it grades trend strength, and +DI above -DI or the reverse supplies direction. Wilder’s own system required ADX above 25 before acting on a DI crossover, and even then ADX confirms a trend already under way rather than predicting one. Treat it as a filter for trend-following methods, not an entry signal.
Add This Calculator to Your Website
References
- Wilder, J. Welles, “New Concepts in Technical Trading Systems” (Trend Research, 1978): the original directional movement system, true range, and Wilder smoothing.
- StockCharts ChartSchool, “Average Directional Index (ADX)”: the reference implementation: both smoothing techniques, the seeded first ADX, and the roughly 150-period seasoning note. StockCharts: Average Directional Index (ADX). Accessed October 2026.
- Fidelity Learning Center, “Average Directional Index (ADX)”: reading ADX with the DI lines and the 25 and 20 thresholds. Fidelity: Average Directional Index (ADX). Accessed October 2026.
- MQL5, “Learn how to design a trading system by ADX”: the manual eight-step build and the 30-day teaching series pre-filled above. MQL5: Design a trading system by ADX. Accessed October 2026.
- ProRealAlgos Documentation, “ADX”: a precise platform spec: DX as a normalised ratio bounded 0 to 100, ADX as the Wilder average of DX. ProRealAlgos: ADX Documentation. Accessed October 2026.
- PL Capital, “Average Directional Index (ADX): Meaning, Calculation and Uses”: the five-step calculation from true range through ADX, 14-period convention. PL Capital: Average Directional Index. Accessed October 2026.
- Investopedia, “Average Directional Index (ADX): Definition and How to Use It”: ADX as a trend-strength, non-directional indicator. Investopedia: Average Directional Index. Accessed October 2026.
