RSI Adaptive Zones
- 지표
- 버전: 1.0
- 활성화: 5
── WHAT IT DOES ────────────────────────────────────────────────────────────────
RSI Adaptive Zones replaces the traditional fixed 70/30 RSI thresholds with zones that are mathematically derived from the statistical distribution of the RSI itself — meaning the bands adapt to the length parameter rather than being arbitrary constants.
The RSI is rendered as full OHLC candles (or bars or a line), giving you intrabar high/low information that a standard RSI line completely hides. Each candle is individually colored based on whether its high or low touches the overbought/oversold zone AND by the direction of the underlying price candle — so you can instantly see whether a zone touch is bullish or bearish context.
── CORE FORMULA ────────────────────────────────────────────────────────────────
The RSI is computed using RMA (Wilder smoothing) seeding from the first bar value.
Zone boundaries are derived from the logistic normal distribution:
• Support/Resistance inner: z = √((5 − √17) / 2) ≈ 0.658σ (~50% mass)
• Support/Resistance outer: z = 1.000σ (breakout point)
• OB/OS inner (coloring): z = √3 σ (reversal inflection)
• OB/OS outer (zone fill): z = √((5 + √17) / 2) ≈ 2.135σ (~1.6% tails)
These z-scores are mapped to RSI distance from 50 via:
distance = 50 × tanh(z / √(Length − 1))
The optional smoothing MA operates entirely in logit-transformed RSI space
(log-odds), preventing the MA from ever exceeding the 0–100 range. Bollinger
Bands in logit space are then back-transformed via the sigmoid function.
── WHAT MAKES THIS DIFFERENT ───────────────────────────────────────────────────
✔ Mathematically-derived zones — not arbitrary 70/30 lines
✔ RSI displayed as OHLC candles showing intrabar high/low
✔ Candle color reflects BOTH zone touch AND underlying price direction
(bullish vs bearish candle on the main chart)
✔ 4 independent zone-touch colors: OB+bull, OB+bear, OS+bull, OS+bear
✔ Logit-space MA/BB smoothing — bands never break 0 or 100
✔ 6 configurable alert conditions (Popup / Sound / Email / Push / All)
✔ Auto-adapts neutral candle color to chart background theme
✔ Optional horizontal Level 50 line
✔ No repainting — all signals fire on closed bars
── VISUAL ELEMENTS ─────────────────────────────────────────────────────────────
In the indicator sub-window you will see:
[GREEN BAND] Overbought zone (top of sub-window)
[GRAY BANDS] Support (upper) and Resistance (lower) zones — two bands
[RED BAND] Oversold zone (bottom of sub-window)
[DOTTED LINE] Level 50 (optional)
[CANDLES/BARS] RSI rendered as OHLC, colored by zone and price direction
[GOLD LINE] Logit-space MA (when enabled)
[ORANGE LINES] Bollinger Bands in logit space (when SMA+BB selected)
── PARAMETERS TABLE ────────────────────────────────────────────────────────────
GROUP: RSI Settings
InpLength | 14 | RMA period for RSI calculation
InpRSIType | Candle | Display mode: Line / Bar / Candle
InpColorRSI | Gray | Neutral candle / line color
GROUP: Visibility and Colors
InpSupRes | true | Show Support/Resistance zones
InpColorSR | Gray | S/R zone fill color
InpOO | true | Show Overbought/Oversold zones
InpColorR | Red | OB zone fill color
InpColorG | Green | OS zone fill color
InpOOColoring | true | Enable OB/OS candle coloring
InpColorOSBull | Green | OS zone touch + price bullish candle
InpColorOSBear | Dark Green | OS zone touch + price bearish candle
InpColorOBBull | Light Red | OB zone touch + price bullish candle
InpColorOBBear | Red | OB zone touch + price bearish candle
InpShowMiddle | true | Show horizontal level at 50
InpColorMiddle | Gray | Level 50 color
GROUP: Advanced
InpColorSens | 1.00 | OB/OS detection sensitivity
GROUP: Alerts
InpAlertOSTouch | false | Alert when candle RSI_L touches OS zone
InpAlertOBTouch | false | Alert when candle RSI_H touches OB zone
InpAlertOSExit | false | Alert when RSI exits oversold (crosses above inner OS)
InpAlertOBExit | false | Alert when RSI exits overbought (crosses below inner OB)
InpAlertCross50Up| false | Alert when RSI crosses above 50
InpAlertCross50Dn| false | Alert when RSI crosses below 50
InpAlertType | Popup | Delivery: Popup / Sound / Email / Push / All
GROUP: RSI Smoothing
InpRSISrc | Close | RSI source: Close / HL2 / HLC3 / HLCC4
InpMAType | None | MA: None/SMA/SMA+BB/EMA/RMA/WMA/VWMA
InpMALength | 21 | MA period
InpColorLMA | Gold | MA line color
InpBBMult | 2.0 | Bollinger Band standard deviation multiplier
InpColorLBB | Orange | BB lines color
── COMPATIBILITY ────────────────────────────────────────────────────────────────
Platform: MetaTrader 5 (build 2361+)
Type: Indicator (separate window)
Symbols: All (Forex, Gold, Indices, Crypto, Stocks)
Timeframes: All (M1 through MN)
Tested on: XAUUSD M5/M15, EURUSD H1, US30 M15
── HOW TO USE ───────────────────────────────────────────────────────────────────
1. Attach to any chart. The indicator opens in a separate sub-window.
2. The default settings (Length=14, Candle mode).
3. Watch for candles that touch the RED band (OS) or GREEN band (OB):
— Green candle in OS zone = bullish pressure at oversold extreme
— Dark green candle in OS zone = bearish candle still at oversold = caution
— Red-tinted candle in OB zone = bearish signal at overbought extreme
4. Use the GRAY bands (S/R zones) as intermediate confluence levels.
5. Enable alerts for the conditions you trade:
— OS Touch + OS Exit combined = confirmation entry trigger
— Cross 50 = momentum direction filter
6. For trend-following, enable the MA (EMA or RMA recommended) and use the
RSI staying above/below the MA as a directional filter.
7. Adjust InpColorSens below 1.0 (try 0.93) if you notice borderline zone
touches not being highlighted on your specific instrument/timeframe.
