RSI Divergency and Golden Ratio
Aug 22, 2021

The RSI Divergency and Golden Ratio indicator is a comprehensive momentum tool designed to identify market reversals through the detection of classic RSI divergences while incorporating moving average and Fibonacci-based levels for trend confirmation.
Usage
The script is used to identify potential trend exhaustion and reversal points by comparing price action against the Relative Strength Index (RSI).
- Positive Divergency: Indicated by a green pole on the RSI pane. This occurs when the price makes a lower low while the RSI makes a higher low (at the "Divergency Scanner Distance"), suggesting weakening bearish momentum.
- Negative Divergency: Indicated by a red pole on the RSI pane. This occurs when the price makes a higher high while the RSI makes a lower high, suggesting weakening bullish momentum.
- SMA Crossover: The indicator plots an SMA of the RSI. Users can look for crossovers between the RSI line and its SMA as secondary confirmation for entry or exit signals.
- Golden Ratio Level: The script calculates a dynamic 0.618 Fibonacci level based on the highest and lowest RSI values within a specified lookback period. This level acts as a significant pivot point or attraction zone for momentum.
Details
The indicator calculates standard RSI and then scans a user-defined lookback window to find historical price peaks and troughs. For a divergence to be valid, it checks if the previous RSI extreme was in overbought (>70) or oversold (<30) territory and ensures the price movement contradicts the RSI movement.
The Fibonacci calculation identifies the absolute high and low of the RSI over a long-term lookback (default 233 periods) and plots the 61.8% level relative to the dominant trend direction within that window.
Settings
- Length: The period used to calculate the standard RSI (default 14).
- Source: The price data used for RSI calculation (default Close).
- Divergency Scanner Distance: The lookback window (in bars) used to search for previous price peaks/troughs to compare for divergence.
- SMA Distance: The period used for the Simple Moving Average of the RSI.
- Fibonacci Distance: The lookback window used to determine the highest and lowest RSI values for the Golden Ratio calculation.
FAQ
How do I access the RSI Divergency and Golden Ratio?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
What do the vertical green and red lines mean?
The vertical lines (poles) represent detected divergences. Green indicates a Positive (bullish) Divergence, while red indicates a Negative (bearish) Divergence.
How is the Golden Ratio level calculated?
It finds the highest and lowest RSI values over the "Fibonacci Distance" and plots the 61.8% retracement level between those two points.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.