PROTECTED SOURCE SCRIPT
DMI by Refri

Compact table for Directional Movement Index (DMI) built to stay readable and configurable.
What it shows
DI+ and DI– from a fixed timeframe via request.security (default 4H), independent of the chart timeframe.
Trend text: Bullish/Bearish/Sideways with strength bucket (Mild/Normal/Strong/Very Strong) derived from the absolute gap |DI+ − DI–|, not ADX.
Values printed with two decimals, no percent sign.
Key controls
Fixed Timeframe (for DMI): choose any resolution; the label auto-displays as 1m/5m/1H/4H/1D/1W/1M.
Gap thresholds: Sideways, Mild, Normal, Strong, Very Strong.
Table Position: top/middle/bottom × left/center/right.
Font Size: tiny/small/normal/large/huge.
Styling
Full manual palette for headers and value cells.
Separate background and text colors for Bullish, Bearish, and Sideways trend states.
Independent colors for DI+ and DI– cells.
Deliberate omissions
No RSI.
No ADX; strength comes solely from the DI gap.
Purpose
Quick, at-a-glance DMI state that remains consistent across timeframes while letting you tune thresholds and visuals to your chart.
What it shows
DI+ and DI– from a fixed timeframe via request.security (default 4H), independent of the chart timeframe.
Trend text: Bullish/Bearish/Sideways with strength bucket (Mild/Normal/Strong/Very Strong) derived from the absolute gap |DI+ − DI–|, not ADX.
Values printed with two decimals, no percent sign.
Key controls
Fixed Timeframe (for DMI): choose any resolution; the label auto-displays as 1m/5m/1H/4H/1D/1W/1M.
Gap thresholds: Sideways, Mild, Normal, Strong, Very Strong.
Table Position: top/middle/bottom × left/center/right.
Font Size: tiny/small/normal/large/huge.
Styling
Full manual palette for headers and value cells.
Separate background and text colors for Bullish, Bearish, and Sideways trend states.
Independent colors for DI+ and DI– cells.
Deliberate omissions
No RSI.
No ADX; strength comes solely from the DI gap.
Purpose
Quick, at-a-glance DMI state that remains consistent across timeframes while letting you tune thresholds and visuals to your chart.
Mã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
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ã được bảo vệ
Tập lệnh này được đăng dưới dạng mã nguồn đóng. Tuy nhiên, bạn có thể tự do sử dụng tập lệnh mà không có bất kỳ hạn chế nào – tìm hiểu thêm tại đây.
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.