The Average Directional Index (ADX) measures trend strength, not direction. +DI and −DI (Directional Indicators) show which side of the market is dominant.
Components
| Line | Meaning |
|---|---|
| ADX | How strong the trend is (0–100 scale) |
| +DI | Strength of upward movement |
| −DI | Strength of downward movement |
ADX is built with Wilder smoothing from true range and directional movement.
Formula
True range for bar t:
TR_t = max(H_t − L_t, |H_t − C_{t−1}|, |L_t − C_{t−1}|)
Directional movement (+DM, −DM) compares the up-move and down-move from the prior bar.
Wilder-smoothed +DI and −DI over period N:
+DI = 100 × Smoothed(+DM) / Smoothed(TR)
−DI = 100 × Smoothed(−DM) / Smoothed(TR)
Directional index and ADX:
DX = 100 × |+DI − −DI| / (+DI + −DI)
ADX = Wilder smoothed average of DX over N bars
Typical settings
| Parameter | Default on dogabot |
|---|---|
| Period | 14 |
| Threshold | 25 |
Common interpretation:
- ADX below 20 — Weak or ranging market
- ADX 25–40 — Developing trend
- ADX above 40 — Strong trend (watch for exhaustion at very high values)
How traders use ADX
Traders often require ADX above a threshold before taking directional trades, then use +DI vs −DI to pick the side. This filters out choppy conditions where trend rules whipsaw.
In dogabot
The ADX trading rule (newer directional rule) emits:
- Buy when ADX ≥ threshold and +DI > −DI
- Sell when ADX ≥ threshold and −DI > +DI
If ADX is below the threshold, the rule stays neutral.
Example
With period 14 and threshold 25, ADX = 32, +DI = 28, −DI = 15. Trend strength passes the threshold and bulls lead → the ADX rule may buy. If ADX = 18, the rule stays neutral regardless of DI.
Related reading
- ADX trading rule
- Strategy rules overview
- Strategy filters — combine ADX with time or volume gates