ADX
ADX (Average Directional Index) shows the strength of a trend regardless of its direction, while the +DI and −DI lines show which side, up or down, prevails right now. Scalpers watch ADX to tell a directional move from a sideways market.
ADX is drawn in a separate area below the chart.
How it is calculated
- For each bar the terminal calculates:
- the true range TR — the largest of High − Low, |High − previous Close| and |Low − previous Close|;
- the up move +DM = High − previous High if it is larger than the down move and above zero, otherwise 0;
- the down move −DM = previous Low − Low if it is larger than the up move and above zero, otherwise 0.
- TR, +DM and −DM are smoothed with Wilder’s method (RMA with a factor of 1/period) over Period bars. The starting value is the simple average of the first values.
- +DI = 100 × smoothed +DM / smoothed TR, −DI = 100 × smoothed −DM / smoothed TR.
- DX = 100 × |+DI − −DI| / (+DI + −DI).
- ADX is DX smoothed with Wilder’s method over ADX smoothing bars. If the parameter is 0, Period is used.
The +DI and −DI lines appear after Period bars, ADX (ADX smoothing − 1) bars later: by default +DI and −DI from the 15th bar, ADX from the 28th. The calculation matches the DMI indicator in TradingView.
Parameters
| Parameter | Description | Default |
|---|---|---|
| Period | The smoothing period of TR, +DM and −DM. At least 1. | 14 |
| ADX smoothing | The smoothing period of the ADX line; 0 means the same as Period. At least 0. | 0 |
Plots
| Parameter | Description | Default |
|---|---|---|
| ADX | The ADX line. | Orange, solid, width 1 |
| +DI | The +DI line. | Blue, solid, width 1 |
| -DI | The −DI line. | Purple, solid, width 1 |
Style
Each line has the Plot (show the line), Label (show the last value on the right scale), Color, Width (1–5) and Style (Solid, Dashes, Dots) fields.
How to add an indicator to the chart is described in Adding an indicator; parameters are changed in the indicator manager.