OPEN-SOURCE SCRIPT

Relative Directional Index (RDI)

418
๐Ÿ” Overview

The Relative Directional Index (RDI) is a hybrid tool that fuses the Average Directional and the Relative Strength Indices (ADX and RSI) into a single, highly visual interface. While the former captures trend strength, the latter reveals momentum shifts and potential exhaustion. Together, they can confirm trend structure, anticipate reversals, and sharpen the timing entries and exits.

๐Ÿ“Œ Why Combine ADX with RSI?

Most indicators focus on either trend-following (like ADX) or momentum detection (like RSI)โ€”but rarely both. Each comes with trade-offs:
- ADX alone confirms trend strength but ignores momentum.
- RSI alone signals overbought/oversold, but lacks trend context.

The RDI resolves this by integrating both, offering:
- Smarter filters for trend entries
- Early warnings of momentum breakdowns
- More confident signal validation

๐Ÿง  Design Note: Fibonacci Harmony

All default valuesโ€”5, 13, 21โ€”are Fibonacci numbers. This is intentional, as these values reflect the natural rhythm of market cycles, and promote harmonic calibration between price action and indicator logic.

๐Ÿ”ฅ Key Features

โœ… ADX Histogram
- Green bars = trend gaining strength
- Red bars = trend weakening
- Adjustable transparency for visual tuning

โœ… ADX Line (Orange)
- Measures trend strength over time
- Rising = accelerating trend
- Falling = trend may be fading

โœ… RSI Line (Lemon Yellow)
- Captures momentum surges and slowdowns
- Above 50 = bullish control
- Below 50 = bearish pressure

โœ… Trend Strength Squares
- Bright green = strong uptrend
- Bright red = strong downtrend
- Faded colors = range-bound or indecisive

โœ… ADX/RSI Crossover Markers
- Yellow square = RSI crosses above ADX โ†’ momentum building
- Orange square = ADX crosses above RSI โ†’ trend still dominant

โœ… Customizable Reference Lines
- Yellow (50) = strong trend threshold
- Red (30) = weak trend zone
- Green (70) = overextended, potential exhaustion

_______________________________________________________

๐ŸŽฏ How to Trade with the RDI

The RDI helps traders identify momentum-supported trends, catch early reversals, and avoid false signals during consolidation.

โœ… Trend Confirmation Entries

๐Ÿ”ผ Bullish โ†’ Enter long on pullbacks or resistance breakouts
- ADX rising above 30
- RSI above 50
- Green trend square visible

๐Ÿ”ฝ Bearish โ†’ Enter short on breakdowns or failed retests
- ADX rising
- RSI below 50
- Red trend square visible

๐Ÿงฏ Exit if RSI crosses back against trend direction or ADX flattens

๐Ÿšจ Reversal Setups Using Divergence

๐Ÿ“ˆ Bullish Divergence โ†’ Long entry after confirmation (e.g. engulfing bar, volume spike)
- Price prints lower low
- RSI prints higher low
- Green triangle

๐Ÿ“‰ Bearish Divergence โ†’ Short entry on breakdown
- Price prints higher high
- RSI prints lower high
- Red triangle

Tip: Stronger if ADX is declining (fading trend strength)

๐Ÿ”‚ Breakout Detection via Cross Markers
- Yellow square = RSI > ADX โ†’ breakout brewing
- Orange square = ADX > RSI โ†’ trend continuation likely

โธ๏ธ Avoid Choppy Markets
- RSI between 45โ€“55
- Faded trend squares
- Flat ADX below 20โ€“30

๐Ÿง  Pro Tips
- Combine RDI with VWAPs, moving averages and/or pitchforks
- Watch for alignment between trend and momentum
- Use divergence markers as confirmation, not stand-alone triggers


_______________________________________________________

โš ๏ธ Hidden Divergence (Optional)

The RDI includes optional hidden divergence detection. These signals suggest trend continuation but are off by default. Use with discretionโ€”best in established trends, not sideways markets.

๐Ÿ™ˆ Hidden Bullish
- Price prints higher low
- RSI prints lower low

๐Ÿ™ˆ Hidden Bearish
- Price prints lower high
- RSI prints higher high

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.