Skip to content

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 ​

  1. Trend judgment
  2. Bull and bear strength analysis
  3. Trading signal filtering
  4. Divergence analysis

Usage Recommendations ​

  1. Rising DDI indicates strengthening bullish power
  2. Falling DDI indicates strengthening bearish power
  3. Pay attention to divergence between DDI and price
  4. Use in combination with other indicators