Indicator Description
DDI (Directional Difference Index) is a technical indicator used to measure the difference in strength between bulls and bears in the market, commonly used for trend judgment and signal filtering.
Function Information
- Function Name: DDI
- Input Parameters: High, Low, Close
- Parameter Settings: timeperiod1 (default: 14), timeperiod2 (default: 5)
- Output: ddi, addi, ad
Calculation Principle
DDI is calculated using the following formula:
DMZ = IF(High + Low <= High[-1] + Low[-1], 0, MAX(High - High[-1], Low - Low[-1]))
DMF = IF(High + Low >= High[-1] + Low[-1], 0, MAX(High - High[-1], Low - Low[-1]))
DIZ = SUM(DMZ, timeperiod1)
DIF = SUM(DMF, timeperiod1)
DDI = (DIZ - DIF) / (DIZ + DIF) * 100
ADDI = MA(DDI, timeperiod2)
AD = MA(ADDI, 5)Where DMZ is the upward movement and DMF is the downward movement.
Usage Scenarios
- Trend judgment
- Bull and bear strength analysis
- Trading signal filtering
- Divergence analysis
Usage Recommendations
- Rising DDI indicates strengthening bullish power
- Falling DDI indicates strengthening bearish power
- Pay attention to divergence between DDI and price
- Use in combination with other indicators