OPEN-SOURCE SCRIPT

Deshmukh Divergence

Atualizado
RSI Divergence with Moving Average Indicator
Description:
This indicator combines RSI divergence signals with a moving average (MA) on the RSI for enhanced trend analysis and signal confirmation. It identifies regular and hidden divergences between the price and RSI values, generating buy/sell signals based on these patterns. The added RSI moving average allows users to spot smoother trends and potential reversals.

How It Works:
RSI Calculation:

The Relative Strength Index (RSI) is calculated using the user-defined length.
Helps identify overbought and oversold conditions.
RSI Moving Average:

A simple moving average (SMA) is applied to the RSI to smooth its fluctuations.
Provides a clearer view of RSI trends.
Divergence Detection:

Regular Divergence:
Buy Signal: Price makes a lower low, but RSI makes a higher low.
Sell Signal: Price makes a higher high, but RSI makes a lower high.
Hidden Divergence:
Buy Signal: Price makes a higher low, but RSI makes a lower low.
Sell Signal: Price makes a lower high, but RSI makes a higher high.
Signal Visualization:

Signals are displayed as labeled shapes on the chart:
Green Up Arrow: Regular Buy.
Red Down Arrow: Regular Sell.
Blue Up Arrow: Hidden Buy.
Orange Down Arrow: Hidden Sell.
Overbought/Oversold Levels:

Horizontal lines mark overbought (70) and oversold (30) zones for quick reference.
This indicator is suitable for traders looking to identify potential trend reversals or continuations with the help of divergence patterns and RSI smoothing
Notas de Lançamento
The "Deshmukh Divergence" indicator identifies both regular and hidden divergences between price action and the Relative Strength Index (RSI). It helps traders spot potential trend reversals or trend continuation signals based on the relationship between price highs/lows and corresponding RSI highs/lows.

Working:
RSI Calculation:

The script calculates the RSI using a specified period (default: 14).
A moving average (SMA) of the RSI is also plotted for additional analysis (default: 9).
Divergence Detection:

Regular Divergence:
Bullish (Buy) Regular Divergence: Occurs when the price forms a lower low (downtrend) but the RSI forms a higher low, signaling a potential trend reversal to the upside.
Bearish (Sell) Regular Divergence: Occurs when the price forms a higher high (uptrend) but the RSI forms a lower high, signaling a potential trend reversal to the downside.
Hidden Divergence:
Bullish (Buy) Hidden Divergence: Occurs when the price forms a higher low, but the RSI forms a lower low, indicating trend continuation to the upside.
Bearish (Sell) Hidden Divergence: Occurs when the price forms a lower high, but the RSI forms a higher high, indicating trend continuation to the downside.
Signal Plotting:

Buy/Sell Signals: The script plots "Buy" and "Sell" labels on the chart when regular divergences are detected. Hidden divergences are marked with "Hidden Buy" and "Hidden Sell" labels.
RSI Visualization: The RSI line is plotted, along with horizontal lines marking overbought (70), oversold (30), and the 50-level midpoint for easy interpretation of the RSI state.
Usage:
Regular Divergence: Indicates potential trend reversals (buy/sell).
Hidden Divergence: Indicates trend continuation (hidden buy/sell).
Notas de Lançamento
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.
forecastingoptionsRelative Strength Index (RSI)

Script de código aberto

No verdadeiro espírito do TradingView, o autor desse script o publicou como código aberto, para que os traders possam compreendê-lo e analisá-lo. Parabéns ao autor! Você pode usá-lo gratuitamente, mas a reutilização desse código em publicações é regida pelas Regras da Casa. Você pode favoritá-lo para usá-lo em um gráfico.

Quer usar esse script no gráfico?


Também em:

Aviso legal