The Deshmukh's Divergence is a custom trading indicator that uses the Relative Strength Index (RSI) and identifies divergence patterns. It highlights four key divergence types: Regular Bullish, Hidden Bullish, Regular Bearish, and Hidden Bearish. It also includes an RSI moving average to smooth out the RSI line and provide additional insights into price momentum.
Working:
RSI Calculation: The indicator calculates the RSI of the price based on a user-defined period (default 14).
Divergence Identification:
Regular Bullish Divergence: Occurs when the price forms a lower low, but the RSI forms a higher low, signaling a potential upward reversal.
Hidden Bullish Divergence: Occurs when the price forms a higher low, but the RSI forms a lower low, indicating continuation of the uptrend.
Regular Bearish Divergence: Occurs when the price forms a higher high, but the RSI forms a lower high, signaling a potential downward reversal.
Hidden Bearish Divergence: Occurs when the price forms a lower high, but the RSI forms a higher high, indicating continuation of the downtrend.
RSI Moving Average: A moving average (default length 9) is applied to the RSI to smooth out the indicator's fluctuations, helping traders identify trends and potential entry/exit points.
Plotting:
The indicator plots the RSI and its moving average.
Divergence signals are highlighted on the chart, with labels and different colors for each divergence type.
The 50 level is marked on the RSI for neutral trend identification, while 30 and 70 levels represent oversold and overbought conditions, respectively.
Alerts: Alert conditions are set for each type of divergence, allowing traders to be notified when a new divergence pattern forms.
This indicator helps traders identify potential trend reversals or continuations based on price and RSI behavior.