OPEN-SOURCE SCRIPT
Directional Indicator Crossovers v1[JopAlgo]

Directional Indicator Crossovers v1 [JopAlgo] — the classic DMI, made clearer and easier to act on
We'd like to introduce you to a more relaxed, streamlined version of DI. While it may not seem like it at first glance, we've taken the D+/D- method as a starting point and developed our own version of this indicator: two lines, a smooth green/red field indicating who's in control, and clear crossover alerts for a flip. We deliberately chose the step line representation because it closely matches the candlestick patterns on the chart. Designed to help you react faster—without clutter.
What you’ll see
+DI (green) and −DI (red) using classic Wilder smoothing.
A soft control zone between the lines: green when +DI dominates, red when −DI dominates.
Crossover alerts (no labels, no background flooding)—just the turning points.
Why this helps
Instant bias: the shaded field tells you who’s in control without reading values.
Cleaner execution: minimal visuals keep focus on the handoff (+DI↔−DI) and your price levels.
Actionable by design: built-in alerts fire right at the flip to route into your workflow.
How to read it
Bias: Green zone → buyers lead. Red zone → sellers lead.
Trigger: Consider entries on the DI crossover that aligns with your higher-timeframe context (trend, S/R, OB).
Patience in chop: If flips are frequent in tight ranges, wait for sustained zone dominance or confirm on a higher TF.
Exit/flip: Opposite crossover or a clear loss of dominance.
Settings that matter
DI Length (default 14): Higher = calmer, fewer flips. Lower = faster, more signals.
Visuals: Keep the control zone on for quick reads; hide crossover marks if you prefer pure lines.
Alerts: Enable bullish and bearish DI cross alerts; connect to notifications or webhooks as needed.
Starter presets
Intraday (15m–1H): DI Length 12–14 for quicker handoffs.
Swing (4H–1D): DI Length 14–20 for cleaner signals.
Choppy assets: Nudge length higher to dampen noise.
Where it shines (and limits)
Best: Liquid markets (crypto majors, indices, large caps) where handoffs matter.
Works elsewhere: Still useful on slower pairs; extend length for stability.
Limit: Frequent flips in low-range sessions—pair with HTF bias or structure.
Alerts included
Bullish DI Crossover: +DI crosses above −DI.
Bearish DI Crossover: −DI crosses above +DI.
Attribution & License
Built on the Directional Movement Index concept by J. Welles Wilder Jr. (1978).
Independent Pine v6 implementation (not derived from TradingView’s built-in source).
Released as Open Source (MPL-2.0)—please keep the license header intact.
Disclaimer
For educational purposes only; not financial advice. Trading involves risk. Test first, use clear levels, and manage risk. This project is independent and not affiliated with or endorsed by TradingView.
We'd like to introduce you to a more relaxed, streamlined version of DI. While it may not seem like it at first glance, we've taken the D+/D- method as a starting point and developed our own version of this indicator: two lines, a smooth green/red field indicating who's in control, and clear crossover alerts for a flip. We deliberately chose the step line representation because it closely matches the candlestick patterns on the chart. Designed to help you react faster—without clutter.
What you’ll see
+DI (green) and −DI (red) using classic Wilder smoothing.
A soft control zone between the lines: green when +DI dominates, red when −DI dominates.
Crossover alerts (no labels, no background flooding)—just the turning points.
Why this helps
Instant bias: the shaded field tells you who’s in control without reading values.
Cleaner execution: minimal visuals keep focus on the handoff (+DI↔−DI) and your price levels.
Actionable by design: built-in alerts fire right at the flip to route into your workflow.
How to read it
Bias: Green zone → buyers lead. Red zone → sellers lead.
Trigger: Consider entries on the DI crossover that aligns with your higher-timeframe context (trend, S/R, OB).
Patience in chop: If flips are frequent in tight ranges, wait for sustained zone dominance or confirm on a higher TF.
Exit/flip: Opposite crossover or a clear loss of dominance.
Settings that matter
DI Length (default 14): Higher = calmer, fewer flips. Lower = faster, more signals.
Visuals: Keep the control zone on for quick reads; hide crossover marks if you prefer pure lines.
Alerts: Enable bullish and bearish DI cross alerts; connect to notifications or webhooks as needed.
Starter presets
Intraday (15m–1H): DI Length 12–14 for quicker handoffs.
Swing (4H–1D): DI Length 14–20 for cleaner signals.
Choppy assets: Nudge length higher to dampen noise.
Where it shines (and limits)
Best: Liquid markets (crypto majors, indices, large caps) where handoffs matter.
Works elsewhere: Still useful on slower pairs; extend length for stability.
Limit: Frequent flips in low-range sessions—pair with HTF bias or structure.
Alerts included
Bullish DI Crossover: +DI crosses above −DI.
Bearish DI Crossover: −DI crosses above +DI.
Attribution & License
Built on the Directional Movement Index concept by J. Welles Wilder Jr. (1978).
Independent Pine v6 implementation (not derived from TradingView’s built-in source).
Released as Open Source (MPL-2.0)—please keep the license header intact.
Disclaimer
For educational purposes only; not financial advice. Trading involves risk. Test first, use clear levels, and manage risk. This project is independent and not affiliated with or endorsed by TradingView.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
@jopalgo | [JopAlgo] — Indicators & strategies. Clear rules, no chasing. Education only. Not financial advice.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
@jopalgo | [JopAlgo] — Indicators & strategies. Clear rules, no chasing. Education only. Not financial advice.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.