OPEN-SOURCE SCRIPT
Telah dikemas kini RSI Divergence Projection

RSI Divergence Projection
Go beyond traditional, lagging indicators with this advanced RSI Divergence tool. It not only identifies four types of confirmed RSI divergence but also introduces a unique, forward-looking engine. This engine spots potential divergences as they form on the current candle and then projects the exact price threshold required to validate them.
Our core innovation is the Divergence Projection Line, a clean, clutter-free visualization that extends this calculated price target into the future, providing a clear and actionable level for your trading decisions.
The Core Logic: Understanding RSI Divergence
For those new to the concept, RSI Divergence is a powerful tool used to spot potential market reversals or continuations. It occurs when the price of an asset is moving in the opposite direction of the Relative Strength Index (RSI). This indicator automatically detects and plots four key types:
Confirmed divergences are plotted with solid-colored lines on the price chart and marked with a "B" (Bearish/Bullish) or "HB" (Hidden Bearish/Hidden Bullish) label.
The Core Innovation: The Divergence Projection
This is where the indicator truly shines and sets itself apart. Instead of waiting for a pivot point to be confirmed, our engine analyzes the current, unclosed candle.
This unique visualization transforms a vague concept into a precise, actionable price target, completely free of chart clutter.
How to Use This Indicator
1. Trading Confirmed Divergences:
Look for the solid lines and the "B" or "HB" labels that appear after a candle has closed and a pivot is confirmed.
A Regular Bullish divergence can be an entry signal for a long position, often placed after the confirmation candle closes.
A Regular Bearish divergence can be an entry signal for a short position.
Hidden Divergences can be used as confirmation to stay in a trade or to enter a trade in the direction of the prevailing trend.
2. Using the Divergence Projection for a Tactical Advantage:
When a dashed line appears on the current price action, you are seeing a potential divergence in real-time.
Look to the right of the current candle for the Projection Line. The price level of this line is your key level to watch.
Example (Potential Bullish Divergence): You see a dashed green line forming from a previous low to the current lower low. To the right, you see a horizontal line projected with a label: "Potential Bull Div | Thresh: 10,750.50".
Interpretation: This means that if the next candle closes below 10,750.50, the RSI will not be high enough to form a divergence. However, if the price pushes up and the next candle closes above 10,750.50, the bullish divergence remains intact and is more likely to be confirmed. This gives you a concrete price level to monitor for entry or exit decisions.
How the Projection Engine Works: A Deeper Dive
To fully trust this tool, it's helpful to understand the logic behind it. The projection engine is not based on guesswork or repainting; it's based on a precise mathematical reverse-engineering of the RSI formula.
Features and Customization
- RSI Settings: Adjust the RSI period and source.
- Divergence Detection: Fine-tune the pivot lookback periods and the min/max range for detecting divergences.
- Price Source: Choose whether to detect divergences using candle Wicks or Bodies.
- Display Toggles: Enable or disable any of the four divergence types, as well as the entire projection engine, to keep your chart as clean as you need it.
Summary of Advantages
- Proactive Signals: Get ahead of the market by seeing potential divergences before they are confirmed.
- Unprecedented Clarity: Our unique Projection Line eliminates chart clutter from overlapping labels.
- Actionable Data: The threshold price provides a specific, objective level to watch, removing guesswork.
- Fully Customizable: Tailor the indicator's settings to match any timeframe or trading strategy.
- All-in-One Tool: No need for a separate RSI indicator; everything you need is displayed directly and cleanly on the price action.
We hope this tool empowers you to make more informed and timely trading decisions. Happy trading
Go beyond traditional, lagging indicators with this advanced RSI Divergence tool. It not only identifies four types of confirmed RSI divergence but also introduces a unique, forward-looking engine. This engine spots potential divergences as they form on the current candle and then projects the exact price threshold required to validate them.
Our core innovation is the Divergence Projection Line, a clean, clutter-free visualization that extends this calculated price target into the future, providing a clear and actionable level for your trading decisions.
The Core Logic: Understanding RSI Divergence
For those new to the concept, RSI Divergence is a powerful tool used to spot potential market reversals or continuations. It occurs when the price of an asset is moving in the opposite direction of the Relative Strength Index (RSI). This indicator automatically detects and plots four key types:
- Regular Bullish Divergence: Price prints a lower low, but the RSI prints a higher low. This often signals that bearish momentum is fading and a potential reversal to the upside is near.
- Hidden Bullish Divergence: Price prints a higher low, but the RSI prints a lower low. This is often seen in an uptrend and can signal a continuation of the bullish move.
- Regular Bearish Divergence: Price prints a higher high, but the RSI prints a lower high. This suggests that bullish momentum is weakening and a potential reversal to the downside is coming.
- Hidden Bearish Divergence: Price prints a lower high, but the RSI prints a higher high. This is often seen in a downtrend and can signal a continuation of the bearish move.
Confirmed divergences are plotted with solid-colored lines on the price chart and marked with a "B" (Bearish/Bullish) or "HB" (Hidden Bearish/Hidden Bullish) label.
The Core Innovation: The Divergence Projection
This is where the indicator truly shines and sets itself apart. Instead of waiting for a pivot point to be confirmed, our engine analyzes the current, unclosed candle.
- Potential Divergence Detection: When the indicator notices that the current price and RSI are setting up for a potential divergence against the last confirmed pivot, it will draw a dashed line on the chart. This gives you a critical head-start before the signal is confirmed.
- The Projection Line (Our Innovation): This is the game-changer. Rather than cluttering your chart with messy labels, the indicator calculates the exact closing price the next candle needs to achieve to make the current RSI level equal to the RSI of the last pivot.
- It then projects a clean, horizontal dashed line at this price level into the future.
- Attached to the end of this line is a single, consolidated label that tells you the type of potential divergence and the exact threshold price.
This unique visualization transforms a vague concept into a precise, actionable price target, completely free of chart clutter.
How to Use This Indicator
1. Trading Confirmed Divergences:
Look for the solid lines and the "B" or "HB" labels that appear after a candle has closed and a pivot is confirmed.
A Regular Bullish divergence can be an entry signal for a long position, often placed after the confirmation candle closes.
A Regular Bearish divergence can be an entry signal for a short position.
Hidden Divergences can be used as confirmation to stay in a trade or to enter a trade in the direction of the prevailing trend.
2. Using the Divergence Projection for a Tactical Advantage:
When a dashed line appears on the current price action, you are seeing a potential divergence in real-time.
Look to the right of the current candle for the Projection Line. The price level of this line is your key level to watch.
Example (Potential Bullish Divergence): You see a dashed green line forming from a previous low to the current lower low. To the right, you see a horizontal line projected with a label: "Potential Bull Div | Thresh: 10,750.50".
Interpretation: This means that if the next candle closes below 10,750.50, the RSI will not be high enough to form a divergence. However, if the price pushes up and the next candle closes above 10,750.50, the bullish divergence remains intact and is more likely to be confirmed. This gives you a concrete price level to monitor for entry or exit decisions.
How the Projection Engine Works: A Deeper Dive
To fully trust this tool, it's helpful to understand the logic behind it. The projection engine is not based on guesswork or repainting; it's based on a precise mathematical reverse-engineering of the RSI formula.
- The Concept: The engine calculates the "tipping point." The Threshold Price is the exact closing price at which the new RSI value would be identical to the RSI value of the previous pivot point. It answers the question: "For this potential divergence to remain valid, where does the next candle need to close?"
- The Technicals: The script takes the target RSI from the last pivot, reverse-engineers the formula to find the required average gain/loss ratio, and then solves for the one unknown variable: the gain or loss needed on the next candle. This required price change is then added to or subtracted from the previous close to determine the exact threshold price.
- This calculation provides the precise closing price needed to hit our target, which is then plotted as the clean and simple Projection Line on your chart.
Features and Customization
- RSI Settings: Adjust the RSI period and source.
- Divergence Detection: Fine-tune the pivot lookback periods and the min/max range for detecting divergences.
- Price Source: Choose whether to detect divergences using candle Wicks or Bodies.
- Display Toggles: Enable or disable any of the four divergence types, as well as the entire projection engine, to keep your chart as clean as you need it.
Summary of Advantages
- Proactive Signals: Get ahead of the market by seeing potential divergences before they are confirmed.
- Unprecedented Clarity: Our unique Projection Line eliminates chart clutter from overlapping labels.
- Actionable Data: The threshold price provides a specific, objective level to watch, removing guesswork.
- Fully Customizable: Tailor the indicator's settings to match any timeframe or trading strategy.
- All-in-One Tool: No need for a separate RSI indicator; everything you need is displayed directly and cleanly on the price action.
We hope this tool empowers you to make more informed and timely trading decisions. Happy trading
Nota Keluaran
Feature Update: The Divergence Strength ScoreTo provide deeper insight and help you filter for only the highest-quality signals, we've introduced a granular Numerical Strength Score.
Every potential divergence is now rated on a scale of 2 to 10, where a higher score indicates a more textbook, high-probability setup. This allows you to instantly gauge the quality of a signal and focus your attention on the divergences that matter most.
How the Score is Calculated
The total score is the sum of two key components—Location and Magnitude—each rated from 1 to 5. This provides a nuanced view of what makes a divergence powerful.
1. Location Score (1-5 points): Where the Divergence Happens
This score evaluates the location of the RSI pivots. The principle is that reversal divergences are significantly more powerful when they occur at extreme overbought or oversold levels. The base score is 1 and increases as the RSI enters more extreme territory.
For Bullish (Reversal) Divergences:
5 points: Both RSI pivots are deeply oversold (below Oversold Level 2, default 20).
4 points: Both RSI pivots are oversold (below Oversold Level 1, default 30).
3 points: At least one of the two pivots is oversold.
2 points: At least one pivot is approaching oversold (below 40).
1 point: Base score if none of the above conditions are met.
For Bearish (Reversal) Divergences:
5 points: Both RSI pivots are deeply overbought (above Overbought Level 2, default 80).
4 points: Both RSI pivots are overbought (above Overbought Level 1, default 70).
3 points: At least one of the two pivots is overbought.
2 points: At least one pivot is approaching overbought (above 60).
1 point: Base score if none of the above conditions are met.
For Hidden Divergences:
Since these are continuation patterns that happen within a trend, their location is less critical. They receive a fixed, neutral score of 3 points for this component.
2. Magnitude Score (1-5 points): The Degree of Disagreement
This score measures how dramatically the price and the RSI are disagreeing. The greater the conflict between price action and momentum, the more significant the divergence.
This is calculated by comparing the percentage change in price versus the percentage change in the RSI between the two pivot points.
5 points: Awarded for an extreme disagreement (>100% difference).
1-4 points: Awarded on a sliding scale for less dramatic, but still significant, disagreements in momentum.
How to Use the Strength Score
Score 8-10: A High-Conviction signal. These are A+ setups that meet multiple criteria for a strong divergence. They warrant immediate attention.
Score 5-7: A Solid signal. These are standard, valid divergences that are certainly worth considering as part of your overall analysis.
Score 2-4: A Low-Conviction signal. While technically a divergence, these signals are weak and may be more prone to failure. They are best used only with strong confirmation from other indicators or price action. (Note: Hidden divergences will always score 4 or higher).
You can customize the Overbought and Oversold levels in the indicator's settings to fine-tune the Location Score to your personal trading strategy.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
The new Order Block Finder V2 is available as invite-only script. Please visit the website for all the details and how to get access:
sites.google.com/view/wugamlo-indicators/
sites.google.com/view/wugamlo-indicators/
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat sebenar TradingView, pencipta skrip ini telah menjadikannya sumber terbuka supaya pedagang dapat menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupun anda boleh menggunakannya secara percuma, ingat bahawa menerbitkan semula kod ini adalah tertakluk kepada Peraturan Dalaman kami.
The new Order Block Finder V2 is available as invite-only script. Please visit the website for all the details and how to get access:
sites.google.com/view/wugamlo-indicators/
sites.google.com/view/wugamlo-indicators/
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.