OPEN-SOURCE SCRIPT
DMI DI Gap by Bybllo

DMI DI Gap by Bybllo
This indicator plots the gap (difference) between the DI+ and DI- lines of the Directional Movement Index (DMI). Instead of visually comparing two separate DI+ / DI- lines to spot a crossover, the difference (DI+ minus DI-) is calculated directly and plotted as a single line around a zero baseline.
A cross above the zero line signals a shift toward bullish momentum, while a cross below the zero line signals a shift toward bearish momentum — each crossing is automatically marked with a buy or sell arrow, so there is no need to eyeball where the two DI lines intersect.
Key Features
A single "DI Gap" line (DI+ minus DI-) replaces the need to watch two overlapping DI+ / DI- lines and spot their crossovers by eye.
Zero-line crossover / crossunder is detected automatically and marked with buy (upward) and sell (downward) triangle arrows, offset a configurable distance from the zero line.
An optional ADX line, rescaled from its native 0–100 range to a custom min/max range, can be overlaid to gauge trend strength alongside the directional gap.
A filled cloud area between the gap line and the zero line is colored according to whether the current gap is positive or negative.
+25 / -25 dotted reference lines help gauge how strong the current directional imbalance is.
Real-price calculation via request.security() ensures values stay consistent regardless of chart type (Heikin Ashi, Renko, etc.).
How to Use
When the DI Gap line crosses above zero, a buy arrow appears below the zero line, indicating directional momentum has turned bullish (DI+ has overtaken DI-).
When the DI Gap line crosses below zero, a sell arrow appears above the zero line, indicating directional momentum has turned bearish (DI- has overtaken DI+).
Use the optional rescaled ADX line to check whether the broader trend has enough strength to support the signal before acting on it.
The +25 / -25 dotted lines can be used as a rough guide for how pronounced the current directional imbalance is.
Notes
The rescaled ADX line is for visual reference only; it does not represent the standard 0–100 ADX scale unless the scale inputs are set to 0 and 100.
Works consistently across chart types since real market price data is always pulled via request.security(), regardless of the chart type currently displayed.
This indicator plots the gap (difference) between the DI+ and DI- lines of the Directional Movement Index (DMI). Instead of visually comparing two separate DI+ / DI- lines to spot a crossover, the difference (DI+ minus DI-) is calculated directly and plotted as a single line around a zero baseline.
A cross above the zero line signals a shift toward bullish momentum, while a cross below the zero line signals a shift toward bearish momentum — each crossing is automatically marked with a buy or sell arrow, so there is no need to eyeball where the two DI lines intersect.
Key Features
A single "DI Gap" line (DI+ minus DI-) replaces the need to watch two overlapping DI+ / DI- lines and spot their crossovers by eye.
Zero-line crossover / crossunder is detected automatically and marked with buy (upward) and sell (downward) triangle arrows, offset a configurable distance from the zero line.
An optional ADX line, rescaled from its native 0–100 range to a custom min/max range, can be overlaid to gauge trend strength alongside the directional gap.
A filled cloud area between the gap line and the zero line is colored according to whether the current gap is positive or negative.
+25 / -25 dotted reference lines help gauge how strong the current directional imbalance is.
Real-price calculation via request.security() ensures values stay consistent regardless of chart type (Heikin Ashi, Renko, etc.).
How to Use
When the DI Gap line crosses above zero, a buy arrow appears below the zero line, indicating directional momentum has turned bullish (DI+ has overtaken DI-).
When the DI Gap line crosses below zero, a sell arrow appears above the zero line, indicating directional momentum has turned bearish (DI- has overtaken DI+).
Use the optional rescaled ADX line to check whether the broader trend has enough strength to support the signal before acting on it.
The +25 / -25 dotted lines can be used as a rough guide for how pronounced the current directional imbalance is.
Notes
The rescaled ADX line is for visual reference only; it does not represent the standard 0–100 ADX scale unless the scale inputs are set to 0 and 100.
Works consistently across chart types since real market price data is always pulled via request.security(), regardless of the chart type currently displayed.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.