top of page

Directional Index (DI)

Updated: May 29

What it is and how to use it


What is it?

The Directional Index (DI) is part of the Directional Movement System and includes the DI+ and DI- lines. These indicators help traders identify the direction and strength of a trend, making them essential for trend-following strategies.


Who made it?

The Directional Movement System, including the DI and ADX, was introduced by J. Welles Wilder in his 1978 book "New Concepts in Technical Trading Systems."


How is it calculated?

The calculation involves several steps, including determining the Directional Movement (DM) and True Range (TR), and then calculating the Directional Indicators (DI+ and DI-).


Calculating DI+ and DI-:

  1. Calculate the differences:

    1. upMove = high - high[1]

    2. downMove = low[1] - low

  2. Determine the Directional Movement (DM):

    1. DMplus = 0

    2. DMminus = 0

    3. if upMove > downMove and upMove > 0 then DMplus = upMove endif

    4. if downMove > upMove and downMove > 0 then DMminus = downMove endif

  3. Calculate the True Range (TR):

    1. TR1 = high - low

    2. TR2 = abs(high - close[1])

    3. TR3 = abs(low - close[1])

    4. TRValue = max(TR1, max(TR2, TR3))

  4. Smooth the DM and TR over a specific period (e.g., 14 periods):

    1. smoothedDMplus = summationperiod / summationperiod

    2. smoothedDMminus = summationperiod / summationperiod

  5. Calculate the Directional Indicators (DI+ and DI-):

    1. DIplusValue = 100 * (smoothedDMplus / summationperiod)

    2. DIminusValue = 100 * (smoothedDMminus / summationperiod)


Code (ProRealTime)


How do you use it?

Trend Direction: 

DI+ and DI- lines indicate the direction of the trend. When DI+ is above DI-, it suggests an upward trend. Conversely, when DI- is above DI+, it suggests a downward trend.


Entry and Exit Signals: 

Traders often use crossovers of the DI+ and DI- lines as potential entry or exit signals. For example, a buy signal may be generated when DI+ crosses above DI-, indicating the start of an upward trend.


FAQ

Q: Is DI a leading or lagging indicator?

A: DI is a lagging indicator. It measures the strength and direction of a trend using the DI+ and DI- lines.


Q: What are the best settings for DI?

A: The default setting for DI is 14 periods. You can adjust it based on your trading strategy and the asset you're analyzing.


Q: How does DI compare to ADX?

A: DI measures the direction of the trend, while ADX measures the strength of the trend. They work well together to give a fuller picture of market conditions.


Strategies using Directional Index

  • None so far.

Wanna do business?

algomatictrading@gmail.com

Follow Us On

  • X
  • Instagram

Get free strategies and exclusive deals!

Thanks for subscribing!

© 2024 by Algomatic Trading AB.     ⏐     Terms & Conditions    ⏐    F. A .Q

Disclaimer: Algomatic Trading is not a financial advisor, and takes no responsibility for the results of your trading. All content on this page should be seen as inspiration, not advice. Always do your own testing before trading any system, and don't risk money you can't afford to lose. Please Read Full Disclaimer Here

bottom of page