OPEN-SOURCE SCRIPT

RSI Pigo Fade

280
RSI Pigo Fade — Multi-Timeframe Extreme Detector

An indicator designed to detect extreme overbought and oversold conditions by
combining traditional RSI with a statistical percentile (KDE-style) across
two simultaneously configurable timeframes.

🎯 PURPOSE

Built specifically for traders looking to fade reversals at target zones
(Fibonacci levels, prior session highs/lows, liquidity sweeps). It filters
REAL RSI extremes from normal trending momentum by analyzing the statistical
position of the current RSI relative to its own recent history.

📊 HOW IT WORKS

The indicator simultaneously analyzes two timeframes (configurable, default
1m and 5m) and calculates two metrics for each:

1. Standard RSI (default 14 periods)
Measures relative price strength on the selected timeframe.

2. KDE Extremity (simplified Kernel Density Estimation)
Calculates how extreme the current RSI is compared to its last 100
historical values. Ranges from 0% (neutral) to 100% (absolute extreme).

- 0% = current RSI sits at the historical median
- 50% = current RSI is at the 25th or 75th percentile
- 100% = current RSI is at the absolute extreme of recent history

The metric uses ta.percentrank() to ensure consistency across different
timeframes. Values remain identical regardless of which chart you're
currently viewing.

🔔 SIGNALS

The indicator triggers alerts when both conditions are met simultaneously:

🔴 BOTH OVERBOUGHT
- RSI ≥ upper threshold in both TFs
- KDE Extremity ≥ defined threshold in both TFs
- Suggests potential ceiling / SHORT candidate at target zones

🟢 BOTH OVERSOLD
- RSI ≤ lower threshold in both TFs
- KDE Extremity ≥ defined threshold in both TFs
- Suggests potential floor / LONG candidate at target zones

Individual TF alerts are also available for early detection.

⚙️ RECOMMENDED CONFIGURATION

For assets with persistent trends (NQ, ES, S&P futures):
- RSI High: 75 / RSI Low: 25
- KDE TF1: 75% / KDE TF2: 65%

For assets with more predictable reversals (Gold, EUR/USD, swing trading):
- RSI High: 70 / RSI Low: 30
- KDE TF1: 70% / KDE TF2: 60%

Asymmetric thresholds (TF2 lower than TF1) reflect the fact that fast TFs
reach extremes before slow ones. TF2 acts as confirmation — it doesn't need
to reach the same absolute extreme as TF1.

📋 DASHBOARD

Real-time display:
- TF (configured timeframe)
- RSI value
- KDE % (statistical extremity)
- Aggregated status: BOTH OVERBOUGHT / BOTH OVERSOLD / Partial / Neutral

Values are color-coded based on conditions: coral red for overbought,
turquoise green for oversold.

🎓 RECOMMENDED USE

This indicator is NOT an automatic entry trigger. It's a quality filter that
confirms statistical extremes. For maximum effectiveness, combine with:

- Technical zone analysis (Fibonacci, prior support/resistance)
- Structural confirmation (BOS, FVGs, session manipulation)
- Multi-timeframe trend and extension indicators

BOTH signals are rare by design. Their scarcity is what makes them valuable.

⚠️ LIMITATIONS

- Requires ~30 seconds at load to build statistical history
- In markets breaking out from prolonged lateral ranges, may give premature
signals (KDE marks extreme but structurally it's nascent momentum).
Combine with trend analysis to avoid this trap.
- Does not work well in illiquid markets or those with large gaps

🔧 CUSTOMIZATION

All parameters are configurable: RSI length, KDE lookback, kernel type
(Gaussian/Uniform/Sigmoid), bandwidth, dashboard position, colors. Adaptable
to any instrument and operational timeframe.

═══════════════════════════════════════════════════════════════
Version: 1.0
Compatibility: Pine Script v6
Type: Overlay with dashboard
═══════════════════════════════════════════════════════════════

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.