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
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน