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
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.