MINUS_DI
MINUS_DI
Summary
Wilder's Minus Directional Indicator: the Wilder-smoothed downward directional movement (-DM) normalized by smoothed True Range. Measures the strength of downward price movement. Higher -DI indicates a stronger downtrend; compared against +DI to gauge directional dominance.
Formula
-DM1 = (prevLow - low) if (prevLow-low)>0 and (high-prevHigh)<(prevLow-low), else 0. Seed -DM/TR = sum of first (period-1) -DM1/TR1, then Wilder-smooth each: X = X - X/period + today. -DI = 100 * (-DM / TR); TR from ta_true_range. If period<=1: -DI1 = -DM1/TR1 (no ×100).
Notes
- Wilder's original integer rounding is not applied (it was removed as unreliable when values are near 1).
Inputs
inHigh— High price of each barinLow— Low price of each barinClose— Close price of each bar
Outputs
outReal— The Minus Directional Indicator (-DI) line
Parameters
| Parameter | Type | Default | Accepted values | Description |
|---|---|---|---|---|
optInTimePeriod | integer | 14 | 1–100000 | Smoothing/lookback period for -DM and TR |
Properties
Numerical Stability: Initial Unstable Period
| Display Flags |
|---|
| ☐ Overlap Input |
| ✅ Independent Y-Axis i |
| ☐ Candlestick |
Implementation
TA-Lib Definition: minus_di.c · minus_di.yaml
| Native | File |
|---|---|
| C | ta_MINUS_DI.c |
| Rust | minus_di.rs |
| Java | Core_MINUS_DI.java |
TA-Lib is also available for Python, R and more using a wrapper.
Aliases
-DI, Negative Directional Indicator
See Also
PLUS_DI · MINUS_DM · DX · ADX · ADXR · TRANGE
References
- J. Welles Wilder, New Concepts in Technical Trading Systems, Trend Research (ISBN 0894590278)