OPEN-SOURCE SCRIPT
RSI Regime & Reversals (Leading) — Bull/Bear Trend Finder

📈 RSI Regime & Reversals (Leading) — Bull/Bear Trend Finder
This advanced RSI-based tool helps identify bullish and bearish market trends before they happen — combining classic RSI analysis with Cardwell-style reversals and range shift detection to act as a leading indicator rather than a lagging one.
🧠 Core Concept
The script detects when RSI behavior “shifts ranges,” a signature of trend changes:
• Bull Regime — RSI pullbacks hold above ~40 (momentum stays strong)
• Bear Regime — RSI rallies stall below ~60 (momentum weakens)
It then looks for leading clues inside those regimes:
• ✅ Positive Reversal: Price makes a higher low while RSI makes a lower low — a bullish continuation or early trend reversal signal.
• ❌ Negative Reversal: Price makes a lower high while RSI makes a higher high — an early warning of weakness.
• 🔁 Classic Divergences: Confirms reversals when RSI and price diverge at pivot points.
🎯 Signals
• Green “▲ Bull lead” — bullish reversal or divergence detected.
• Red “▼ Bear lead” — bearish reversal or divergence detected.
• Optional background shading:
• 🟩 Teal = Bullish regime
• 🟥 Red = Bearish regime
⚙️ Customization
• Regime sensitivity — Adjust RSI floor/ceiling for your asset’s volatility.
• Pivot sensitivity — Tune pivot lookback (L/R bars) for faster or slower signals.
• RSI smoothing — Filters noise without losing responsiveness.
• Alerts included — Trigger TradingView alerts for bullish or bearish leading signals.
🕵️♂️ Why it’s different
Unlike standard RSI divergences (which confirm after the move), this indicator uses positive/negative reversals to identify potential trend shifts early — a technique favored by Andrew Cardwell’s RSI analysis.
📊 Works great for:
• Swing trading and trend detection
• Spotting momentum regime shifts
• Stocks, crypto, FX, indices
This advanced RSI-based tool helps identify bullish and bearish market trends before they happen — combining classic RSI analysis with Cardwell-style reversals and range shift detection to act as a leading indicator rather than a lagging one.
🧠 Core Concept
The script detects when RSI behavior “shifts ranges,” a signature of trend changes:
• Bull Regime — RSI pullbacks hold above ~40 (momentum stays strong)
• Bear Regime — RSI rallies stall below ~60 (momentum weakens)
It then looks for leading clues inside those regimes:
• ✅ Positive Reversal: Price makes a higher low while RSI makes a lower low — a bullish continuation or early trend reversal signal.
• ❌ Negative Reversal: Price makes a lower high while RSI makes a higher high — an early warning of weakness.
• 🔁 Classic Divergences: Confirms reversals when RSI and price diverge at pivot points.
🎯 Signals
• Green “▲ Bull lead” — bullish reversal or divergence detected.
• Red “▼ Bear lead” — bearish reversal or divergence detected.
• Optional background shading:
• 🟩 Teal = Bullish regime
• 🟥 Red = Bearish regime
⚙️ Customization
• Regime sensitivity — Adjust RSI floor/ceiling for your asset’s volatility.
• Pivot sensitivity — Tune pivot lookback (L/R bars) for faster or slower signals.
• RSI smoothing — Filters noise without losing responsiveness.
• Alerts included — Trigger TradingView alerts for bullish or bearish leading signals.
🕵️♂️ Why it’s different
Unlike standard RSI divergences (which confirm after the move), this indicator uses positive/negative reversals to identify potential trend shifts early — a technique favored by Andrew Cardwell’s RSI analysis.
📊 Works great for:
• Swing trading and trend detection
• Spotting momentum regime shifts
• Stocks, crypto, FX, indices
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.