PROTECTED SOURCE SCRIPT
업데이트됨

RSI Divergence Detector

75
Overview
The RSI Divergence Detector is a comprehensive technical analysis tool designed to identify both regular and hidden divergences between price action and the Relative Strength Index (RSI). This indicator helps traders spot potential trend reversals and continuations by automatically detecting when price movements diverge from RSI momentum.

What are Divergences?
Regular Divergences signal potential trend reversals:

Bullish Divergence: Price makes a lower low while RSI makes a higher low → Potential upward reversal
Bearish Divergence: Price makes a higher high while RSI makes a lower high → Potential downward reversal

Hidden Divergences signal trend continuation:

Hidden Bullish Divergence: Price makes a higher low while RSI makes a lower low → Uptrend continuation
Hidden Bearish Divergence: Price makes a lower high while RSI makes a higher high → Downtrend continuation

Automatic Divergence Detection

Detects all four types of divergences automatically
Draws connecting lines between divergence points on the RSI
Labels each divergence with clear text indicators ("Bull", "Bear", "HBull", "HBear")
Independent toggle switches for each divergence type

Dynamic RSI Display

RSI line changes color based on momentum:
  • Green when RSI is above 50 (bullish momentum)
  • Red when RSI is below 50 (bearish momentum)

Standard overbought (70) and oversold (30) levels marked
Shaded background zones for overbought/oversold areas

Pivot Detection System
Adjustable pivot lookback period (default: 4 bars)
Visual pivot markers at tops and bottoms of RSI
Configurable maximum divergence range (default: 60 bars)
Adjust the setting to you desired sensitivity on each timeframe.

Full Customization Suite

Label Customization:
Choose label size (Tiny, Small, Normal, Large, Huge)
Separate color selection for each divergence type
Adjustable transparency (0-100%)

Line Customization:
Independent color control for bullish and bearish lines
Line style options for each type (Solid, Dashed, Dotted)
Default: Regular divergences use dashed lines, hidden divergences use dotted lines

Visual Settings:
Customizable overbought/oversold zone colors and transparency
Gray horizontal reference lines (70, 50, 30)
Pivot markers with adjustable visibility

Default Settings
RSI Length: 14 periods
Pivot Lookback: 4 bars
Max Divergence Range: 60 bars
Label Size: Normal
Bullish Color: #4CAF50 (Material Green)
Bearish Color: #FF5252 (Material Red)
Regular Line Style: Dashed
Hidden Line Style: Dotted

How to Use
Customize Settings: Adjust colors, line styles, and detection parameters to your preference
Toggle Divergence Types: Enable/disable specific divergence types based on your trading strategy
Identify Signals: Look for labeled divergences with connecting lines on the RSI pane
Confirm with Price Action: Use divergences in conjunction with other technical analysis tools

Best Practices
Regular Divergences: Best used to spot potential reversals at market extremes
Hidden Divergences: Best used to identify pullback entry points in trending markets
Confirmation: Always wait for price confirmation before entering trades based on divergences
Multiple Timeframes: Check for divergences across multiple timeframes for stronger signals
Risk Management: Use proper stop-losses as not all divergences lead to reversals

Technical Specifications
PineScript Version: v6
Indicator Type: Oscillator (separate pane)
Maximum Lines: 500
Calculation Method: Pivot-based divergence detection using price and RSI comparisons
릴리즈 노트
Overview
The RSI Divergence Detector is a comprehensive, professional-grade technical analysis tool designed to identify both regular and hidden divergences between price action and the Relative Strength Index (RSI). This advanced indicator helps traders spot potential trend reversals and continuations by automatically detecting when price movements diverge from RSI momentum, with multi-timeframe analysis capabilities and extensive customization options.

What are Divergences?
Regular Divergences signal potential trend reversals:
Bullish Divergence: Price makes a lower low while RSI makes a higher low → Potential upward reversal
Bearish Divergence: Price makes a higher high while RSI makes a lower high → Potential downward reversal

Hidden Divergences signal trend continuation:

Hidden Bullish Divergence: Price makes a higher low while RSI makes a lower low → Uptrend continuation
Hidden Bearish Divergence: Price makes a lower high while RSI makes a higher high → Downtrend continuation

Key Features
Automatic Divergence Detection

Detects all four types of divergences automatically
Draws connecting lines between divergence points on the RSI
Customizable labels with user-defined text for each divergence type
Independent toggle switches for each divergence type
Adjustable pivot detection sensitivity and lookback range

Dynamic Color-Coded RSI Display
Adaptive RSI coloring based on position relative to RSI Moving Average:
Green (50% opacity) when RSI is above its MA (bullish momentum)
Red (50% opacity) when RSI is below its MA (bearish momentum)
Orange (70% opacity) when RSI equals its MA (crossover point)

Standard overbought (70) and oversold (30) levels marked with gray lines
Shaded background zones for overbought/oversold areas with customizable colors

Multi-Timeframe Analysis
Higher Timeframe RSI Overlay: Display HTF RSI directly on your indicator pane
Customizable HTF Selection: Choose any higher timeframe (1h, 4h, daily, etc.)
Multi-Timeframe Panel: Real-time table showing RSI values across multiple timeframes

Current timeframe + 5m, 15m, 1h RSI values

Color-coded status indicators:
Red background: Overbought (RSI ≥ 70)
Orange: Warning zones (60-70, 30-40)
Gray: Neutral (40-60)
Green: Oversold (RSI ≤ 30)

Status column shows "OB" (Overbought), "OS" (Oversold), or "---" (Neutral)
Adjustable panel position (4 corner options)

Instant visibility into RSI conditions across timeframes for better trade timing

Advanced RSI Moving Average System
Multiple MA types available: SMA, EMA, WMA, VWMA, HMA
Adjustable period (default: 14)
Optional RSI Bollinger Bands with customizable standard deviation
Sleek, subtle styling: Thin line (linewidth 1) with light gray default color (#dbdbdb)
Toggle on/off independently from divergence detection

Pivot Detection System
Adjustable pivot lookback period (default: 4 bars)
Visual pivot markers at tops and bottoms of RSI
Configurable maximum divergence range (default: 60 bars)
Smart pivot tracking with historical data management

Comprehensive Customization Suite
Label Customization:
Choose label size (Tiny, Small, Normal, Large, Huge)
Custom text entry for all four divergence label types:

Bullish Divergence (default: "Bull")
Bearish Divergence (default: "Bear")
Hidden Bullish Divergence (default: "HBull")
Hidden Bearish Divergence (default: "HBear")


Separate color selection for each divergence type
Adjustable transparency (0-100%)

Color Settings Group:
RSI Color Above MA - Full control with default 50% opacity green
RSI Color Below MA - Full control with default 50% opacity red
RSI Color At MA - Full control with default 70% opacity orange (#ffb74d)
RSI MA Color - Full control with default light gray (#dbdbdb)

Line Customization:
Independent color control for bullish and bearish divergence lines
Line style options for each type (Solid, Dashed, Dotted)
Separate styles for regular vs hidden divergences
Default: Regular divergences use dashed lines, hidden divergences use dotted lines

Visual Settings:
Customizable overbought/oversold zone colors and transparency
Gray horizontal reference lines (70, 50, 30) for clean appearance
Pivot markers with adjustable visibility and position (top/bottom edges)

Multi-Timeframe Trading Applications
Trend Confirmation: Verify trend direction across multiple timeframes
Divergence Validation: Higher timeframe divergences are more reliable
Entry Timing: Use lower timeframes for precise entry after HTF confirmation
Market Context: Instant visual scan shows if RSI is aligned or conflicted across timeframes
Reduced False Signals: Filter out divergences that don't align with higher timeframes

Default Settings
RSI Settings:
RSI Length: 14 periods
RSI MA Type: SMA
RSI MA Length: 14 periods
RSI MA Line: Linewidth 1, Color #dbdbdb
Bollinger Bands: Disabled (StdDev 2.0 when enabled)

Divergence Settings:
Pivot Lookback: 4 bars
Max Divergence Range: 60 bars
All divergence types: Enabled

Visual Defaults:
Label Size: Normal
Label Text: "Bull", "Bear", "HBull", "HBear"
RSI Color Above MA: Green at 50% opacity
RSI Color Below MA: Red at 50% opacity
RSI Color At MA: Orange (#ffb74d) at 70% opacity
Bullish Colors: #4CAF50 (Material Green)
Bearish Colors: #FF5252 (Material Red)
Regular Line Style: Dashed
Hidden Line Style: Dotted

Multi-Timeframe Defaults:
MTF Analysis: Disabled
Higher Timeframe: 60 minutes
MTF Panel: Enabled (when MTF is on)
Panel Position: Top Right

How to Use
Basic Setup:

Open TradingView and add to your chart via Pine Editor
The indicator appears in a separate pane below your price chart
Divergences are automatically detected and labeled
Customize colors, labels, and settings to match your trading style

Multi-Timeframe Analysis:

Enable "Enable Multi-Timeframe Analysis" in settings
Turn on "Show MTF Panel" to see the timeframe table
Optionally enable "Show Higher Timeframe RSI" to plot HTF RSI line
Watch for alignment across timeframes for high-probability setups

Customization:

Label Text: Edit label text in "Label Customization" group
Colors: Adjust all colors in "Color Settings" group
Line Styles: Change divergence line appearance in "Line Customization"
RSI Settings: Modify RSI calculation and MA parameters
Divergence Settings: Fine-tune pivot detection and range

Trading Workflow:

Check MTF Panel: Scan current market conditions across timeframes
Identify Divergences: Look for labeled divergences on current timeframe
Confirm with HTF: Verify divergence aligns with higher timeframe RSI
Wait for Color Change: Watch RSI line color shift at MA crossover
Plan Entry: Use confluence of signals for trade entry

면책사항

해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.