RSI Divergences + Bollinger Bands█ OVERVIEW
Here's the RSI divergences with Bollingers bands.
█ CONCEPTS
5 features
1 — RSI
2 — Bollinger bands
3 — RSI signal is in another color when above 70 or below 30
4 — Looking for previous Divergences, Bullish, Bearish and Hidden Bullish and Bearish but I don't like Hidden divergences
5 — Color fill when overbuy or oversold
█ OTHER SECTIONS
I like to see it like a moutain, with snow on top and lake on bottom. I think you don't want to start walking at the top, nor sink to the bottom of the lake for ever and ever.
It is an idea of sjoerd , tip him if you like it.
An oscillator is good to know where we are in the trends, but it's not enough to run a small business of trading, you need to learn how to use it.
What is a divergence ?
Thanks to The rational investor for teaching me how to use this indicator.
Поиск скриптов по запросу "rsi divergence"
RSI Divergence (Regular + Hidden, @darshakssc)This indicator detects regular and hidden divergence between price and RSI, using confirmed swing highs and swing lows (pivots) on both series. It is designed as a visual analysis tool, not as a signal generator or trading system.
The goal is to highlight moments where price action and RSI momentum move in different directions, which some traders study as potential early warnings of trend exhaustion or trend continuation. All divergence signals are only drawn after a pivot is fully confirmed, helping to avoid repainting.
The script supports four divergence types:
Regular Bullish Divergence
Regular Bearish Divergence
Hidden Bullish Divergence
Hidden Bearish Divergence
Each type is drawn with a different color and labeled clearly on the chart.
Core Concepts Used
1. RSI (Relative Strength Index)
The script uses standard RSI, calculated on a configurable input source (default: close) and length (default: 14).
RSI is treated purely as a momentum oscillator – the script does not enforce oversold/overbought interpretations.
2. Pivots / Swings
The indicator defines swing highs and swing lows using ta.pivothigh() and ta.pivotlow():
A swing high forms when a bar’s high is higher than a specified number of bars to the left and to the right.
A swing low forms when a bar’s low is lower than a specified number of bars to the left and to the right.
The same pivot logic is applied to both price and RSI.
Because pivots require “right side” bars to form, the indicator:
Waits for the full pivot to be confirmed (no forward-looking referencing beyond the rightBars parameter).
Only then considers that pivot for divergence detection.
This helps prevent repainting of divergence signals.
How Divergence Is Detected
The script always uses the two most recent confirmed pivots for both price and RSI. It tracks:
Last two swing lows in price and RSI
Last two swing highs in price and RSI
Their pivot bar indexes and values
A basic minimum distance filter between the pivots (in bars) is also applied to reduce noise.
1. Regular Bullish Divergence
Condition:
Price makes a lower low (LL) between the last two lows
RSI makes a higher low (HL) over the same two pivot lows
The RSI difference between the two lows is greater than or equal to the user-defined minimum (Min RSI Difference)
The two low pivots are separated by at least Min Bars Between Swings
Interpretation:
Some traders view this as bearish momentum weakening while price prints a new low. The script only marks this structure; it does not assume any outcome.
On the chart:
Drawn between the previous and current price swing lows
Labeled: “Regular Bullish”
Color: Green (by default in the script)
2. Regular Bearish Divergence
Condition:
Price makes a higher high (HH) between the last two highs
RSI makes a lower high (LH) over the same two pivot highs
RSI difference exceeds Min RSI Difference
Pivots are separated by at least Min Bars Between Swings
Interpretation:
Some traders see this as bullish momentum weakening while price prints a new high. Again, the indicator simply highlights this divergence.
On the chart:
Drawn between the previous and current price swing highs
Labeled: “Regular Bearish”
Color: Red
3. Hidden Bullish Divergence
Condition:
Price makes a higher low (HL) between the last two lows
RSI makes a lower low (LL) over the same two lows
RSI difference exceeds Min RSI Difference
Pivots meet the minimum distance requirement
Interpretation:
Some traders interpret hidden bullish divergence as a potential trend continuation signal within an existing uptrend. The indicator does not classify trends; it just tags the pattern when price and RSI pivots meet the conditions.
On the chart:
Drawn between the previous and current price swing lows
Labeled: “Hidden Bullish”
Color: Teal
4. Hidden Bearish Divergence
Condition:
Price makes a lower high (LH) between the last two highs
RSI makes a higher high (HH) over those highs
RSI difference exceeds Min RSI Difference
Pivots meet the minimum distance filter
Interpretation:
Some traders associate hidden bearish divergence with potential downtrend continuation, but again, this script only visualizes the structure.
On the chart:
Drawn between the previous and current price swing highs
Labeled: “Hidden Bearish”
Color: Orange
Inputs and Settings
1. RSI Settings
RSI Source – Price source for RSI (default: close).
RSI Length – Period for RSI calculation (default: 14).
These control the responsiveness of the RSI. Shorter lengths may show more frequent divergence; longer lengths smooth the signal.
2. Swing / Pivot Settings
Left Swing Bars (leftBars)
Right Swing Bars (rightBars)
These define how strict the pivot detection is:
Higher values → fewer, more significant swings
Lower values → more swings, more signals
Because the script uses ta.pivothigh / ta.pivotlow, a pivot is only confirmed once rightBars candles have closed after the candidate bar. This is an intentional design to reduce repainting and make pivots stable.
3. Divergence Filters
Min Bars Between Swings (Min Bars Between Swings)
Requires a minimum bar distance between the two pivots used to form divergence.
Helps avoid clutter from pivots that are too close to each other.
Min RSI Difference (Min RSI Difference)
Requires a minimum absolute difference between RSI values at the two pivots.
Filters out very minor changes in RSI that may not be meaningful.
4. Visibility Toggles
Show Regular Divergence
Show Hidden Divergence
You can choose to display:
Both regular and hidden divergence, or
Only regular divergence, or
Only hidden divergence
This is useful if you prefer to focus on one type of structure.
5. Alerts
Enable Alerts
When enabled, the script exposes four alert conditions:
Regular Bullish Divergence Confirmed
Regular Bearish Divergence Confirmed
Hidden Bullish Divergence Confirmed
Hidden Bearish Divergence Confirmed
Each alert fires after the corresponding divergence has been fully confirmed based on the pivot and bar confirmation logic. The script does not issue rapid or intrabar signals; it uses confirmed historical conditions.
You can set these in the TradingView Alerts dialog by choosing this indicator and selecting the desired condition.
Visual Elements
On the main price chart, the indicator:
Draws a line between the two price pivots involved in the divergence.
Adds a small label at the latest pivot, describing the divergence type.
Colors are used to differentiate divergence categories (Green/Red/Teal/Orange).
This makes it easy to visually scan the chart for zones where price and RSI have diverged.
What to Look For (Analytical Use)
This indicator is intended as a visual helper, especially when:
You want to quickly see where price made new highs or lows while RSI did not confirm them in the same way.
You are studying momentum exhaustion, shifts, or continuation using RSI divergence as one of many tools.
You want to compare divergence occurrences across different timeframes or instruments.
Important:
The indicator does not tell you when to enter or exit trades.
It does not rank or validate the “quality” of a divergence.
Divergence can persist or fail; it is not a guarantee of reversal or continuation.
Many traders combine divergence analysis with:
Higher timeframe context
Trend filters (moving averages, structure)
Support/resistance zones or liquidity areas
Volume, structure breaks, or other confirmations
Disclaimer
This script is provided for educational and analytical purposes only.
It does not constitute financial advice, trading advice, or investment recommendations.
No part of this indicator is intended to suggest, encourage, or guarantee any specific trading outcome.
Users are solely responsible for their own decisions and risk management.
RSI Divergence Screener by zdmreThis screener tracks the following for up to 20 assets:
-All selected tickers will be screened in same timeframes (as in the chart).
-Values in table indicate that how many days passed after the last Bullish or Bearish of RSI Divergence.
For example, when BTCUSDT appears Bullish-Days Ago (15) , Bitcoin has switched to a Bullish Divergence signal 15 days ago.
Thanks to @QuantNomad and @MUQWISHI for building the base for this screener.
*Use it at your own risk
Note:
Screener shows the information about the RSI Divergence Scanner by zdmre with default settings.
Based indicator:
RSI-Divergence Goggles [Trendoscope®]🎲 Introducing the RSI-Divergence Goggle
🎯 Revolutionizing Divergence Analysis in Trading
While the concept of divergence plays a crucial role in technical analysis, existing indicators in the community library have faced limitations, particularly in simultaneously displaying divergence lines on both price and oscillator graphs. This challenge stems from the fact that RSI and other oscillators are typically plotted in a separate pane from the price chart. Traditional Pine Script® indicators are confined to a single pane, thus restricting comprehensive divergence analysis.
🎯 Our Innovative Solution: RSI on the Price Pane
The RSI-Divergence Goggle breaks through these limitations. Our innovative approach involves plotting the RSI directly onto the price pane within a movable and resizable widget. This groundbreaking feature allows for the simultaneous drawing of zigzag patterns on both price and the oscillator, enabling the effective calculation and visualization of divergence lines on both.
🎯 The Foundation: Our Divergence Research and Rules
Our journey into divergence research began three years ago with the launch of the "Zigzag Trend Divergence Detector." The foundational rules established with this script remain pertinent and form the basis of all our subsequent divergence-based indicators.
🎯 Understanding Divergence: Key Concepts
Divergence Varieties : We identify two main types - Bullish Divergence (and its hidden counterpart) occurs at pivot lows, while Bearish Divergence (and its hidden version) appears at pivot highs.
Contextual Occurrence : Bullish divergence is a phenomenon of downtrends, whereas bearish divergence is unique to uptrend. Conversely, hidden bullish divergence arises in uptrends, and hidden bearish divergence in downtrends.
Oscillator Behavior : In standard divergence scenarios, the oscillator lags behind price, signaling potential reversals. In hidden divergence cases, the oscillator leads, suggesting trend continuation.
🎯 Visual Insights: Divergence and Hidden Divergence
For a clearer understanding, refer to our visual guides:
🎯 A Word of Caution
While divergence is a powerful tool, it's not a standalone guarantee of trend reversals or continuations. We recommend using these patterns in conjunction with support and resistance levels, as demonstrated in our "Divergence Based Support Resistance" implementation.
🎯 Using the RSI-Divergence Goggles
Upon applying the indicator to your chart, you'll be prompted to select two corner points, defining the widget's placement and size. This widget is the stage for your RSI plotting and divergence calculations. Choose these points carefully to ensure they encompass your area of interest without overlapping important price bars.
An example as below.
🎯 Innovative Features:
Plotting RSI: RSI values are scaled from 0 to 100 within the widget. This unique plotting may not align with individual bar values, but pivot labels and tooltips provide detailed RSI and retracement ratio information.
Zigzag and Pivots: Our adjusted RSI plots determine the zigzag pivot highs and lows, which may not always correspond with visible price pivots. However, calculations based on close prices ensure minimal deviation.
Divergence Display: Divergence types are identified following our established rules, with a simple moving average employed to discern the prevailing trend.
🎯 Trend Detection Mechanism
A simple moving average is used as base for determining the trend. If the difference between moving averages of the alternate pivots is positive, then the sentiment is considered to be uptrend. Else, we consider the sentiment to be in downtrend.
This is a simple method to identify trend, implemented via this indicator. The indicator does not provide alternative methods to identify trend. This is something that we can explore in the future.
🎯 Interactive and Customizable
The RSI-Divergence Goggle isn't just a static tool; it's an interactive feature on your chart. You can move or resize the widget, allowing for dynamic analysis and focused study on different chart segments.
[_ParkF]RSI Divergence_overlayRSI Divergence_overlay
Does not include RSI indicator.
Up Signal = Displayed green dot below the candle
Down Signal = Dispalyed red dot above the candle
* Don't trade just at the signal
RSI 다이버전스
RSI 지표 미포함.
상승 신호 = 초록색 점으로 캔들 아래 표시.
하락 신호 = 빨간색 점으로 캔들 위에 표시.
* 신호만 보고 매매하지 마세요
RSI Divergence Fast by RSUAdvantages:
1. When rsi is at a high point, once it falls by 1 k line, it will detect the divergence from the previous high point. This can quickly find the divergence that has taken effect and help you quickly capture the trend before a sharp decline or rise.
The difference between other RSI divergence indicators: the official divergence indicator is to detect the 5 and the k line, which may lead to a large amount of decline.
2. This indicator detects the previous high and the previous low of 5, 10, 20 lengths at the same time, instead of only detecting a fixed length, so that more deviations can be found.
Notice:
Because it is a quick divergence detection, it is recommended to confirm that the divergence takes effect after the current k is completely closed first. I have identified this state in the indicator as "k not end"
Disadvantages and Risks
Since it is a quick discovery, there will be error identification. I listed the difference between the two indicators when deleting errors. The indicator turns off the "delete error" option by default.
Please do not:
Don't go short in the uptrend, don't go long in the downtrend.
Top divergences that occur because of a strong uptrend are usually only temporary pullbacks. Bottom divergences in persistent declines are also temporary rallies. Do not attempt to trade such low-return trades.
It is recommended to use the divergence indicator when the stock price has made a new high and retraced, and once again made a new high, because this often leads to the end of the trend.
Divergence how to use:
1. After the previous K line was completely closed, a bottom divergence was found.
2. Open an long order at the beginning of the second bar, or as close to the bottom as possible (because the stop loss will be smaller).
3. Break the stop loss price below the previous low where the divergence occurred, which already means that the divergence is wrong.
RSI usage:
1. RSI is above the 50 line, in an uptrend, below 50 in a downtrend.
2. Above 70 is overbought, falling below the oversold zone may mean the end of the uptrend.
Below 30 is oversold, above the oversold zone may mean the end of the downtrend.
RSI Divergence Strategywhat is "RSI Divergence Strategy"?
it is a RSI strategy based this indicator:
what it does?
it gives buy or sell signals according to RSI Divergences. it also has different variables such as "take profit", "stop loss" and trailing stop loss.
how it does it?
it uses the "RSI Divergence" indicator to give signal. For detailed information on how it works, you can visit the link above. The quantity of the inputs is proportional to the rsi values. Long trades are directly traded with "RSI" value, while short poses are traded with "100-RSI" value.
How to use it?
The default settings are for scalp strategy but can be used for any type of trading strategy. you can develop different strategies by changing the sections. It is quite simple to use.
RSI length is length of RSİ
source is source of RSİ
RSİ Divergence lenght is length of line on the RSI
The "take profit", "stop" and "trailing stop" parts used in the "buy" group only affect buys. The "sell" group is similarly independent of the variables in the "buy" group.
The "zoom" section is used to enlarge or reduce the indicator. it only changes the appearance, it does not affect the results of the strategy.
RSI Divergence UltimateHere it is Everyone - What was once hidden is now revealed
This is the Ultimate RSI Divergence Indicator
Not only does it plot Regular and Hidden Divergence lines for an RSI smoothed by an EMA and for its Signal Line
The RSI can be set to change color with direction or can be set as single color with or with out OB / OS highlights
Color Changing RSI helps when trading Multiple Time Frames as you can look for confluence in the direction of RSI
Included options for the Signal Line include;
Various calculations EMA, SMA and Linear Regression which provides very accurate signal line crossover signals
Color Changing with direction
Second RSI with different Length
Multi Time Frame RSI
Bollinger Bands applied to the RSI
RSI Stochastic that has been compressed to fit into RSI OB / OS so that it doesnt compress the RSI when in these regions
There are also Background Highlights (thanks to Chris Moody) for when the RSI Stochastic moves into OB / OS and crosses its signal line
There are plenty of Alerts for signals with more complex alerts coming soon
I have also added Hima Reddy's Power Zones for support and resistance so now you can also
Take full advantage of trading; signal line crosses, 50 crosses and Power Zone RSI support and resistance and much more
The divergence script is thanks to @RicardoSantos, I've just adjusted it to suite my indicator
Remember that divergences work best when traded with the trend or very late in a trend when going against the trend
RSI Divergence Tops + BottomsRSI Indicator which plots local peaks and troughs in divergence.
Divergence is specified as:
- A higher price, with reduced RSI --> Potential Sell Point
- A lower price, with higher RSI --> Potential Buy Point
RSI Divergence should be used in combination with other indicators. This indicator identifies local tops and bottoms, with potential for macro trend shifts.
Read more about trading RSI Divergence on Investopedia here: www.investopedia.com
RSI Divergence Indicator with Strength and LabelsHere's a complete Pine Script (version 5) for a TradingView indicator that detects and plots bullish and bearish RSI divergences. This is based on a proven method that tracks price and RSI swings while RSI is in oversold/overbought territories, then checks for mismatched highs/lows within a configurable bar distance.
RSI Divergence on 15-Minute with 5min & 1min CorrectionUse the 5 minute chart to identify 15 minute rsi divergence, showing the 5 and 1 min rsi levels "participating in" the correction of the 15 minute rsi divergence.
RSI Divergence SmoothedRSI Divergence Smoothed
This indicator is based on the RSI Divergence indicator by @InvestitoreComune.
The "RSI Divergence Smoothed" is a custom technical indicator designed to highlight divergence between two RSI (Relative Strength Index) lines: a fast RSI and a slow RSI. The divergence is then visualized on the chart, assisting traders in recognizing potential market reversals and trend continuation.
Here's a breakdown of its smoothing options added:
1. **WMA Difference**: The indicator first computes a weighted moving average (WMA) difference, which takes the difference between the WMA of half the input length and the WMA of the full length.
2. **Hull Moving Average (HMA)**: The indicator can use the HMA as a filter. HMA combines the benefits of a simple moving average and a linear weighted moving average, aiming to be faster in response to price changes.
3. **Sine Weighted Moving Average (SWMA)**: Another filter option, SWMA, weighs the data points by the sine of their position in the data set, giving more weight to the central data points.
4. **Kaufman's Adaptive Moving Average (KAMA)**: KAMA adapts to price volatility and can also be used as a filter. It's especially useful in choppy markets, adjusting the smoothing constant based on the relative volatility of the price series.
5. **Gaussian Moving Average (GMA)**: This filter uses a Gaussian kernel to weigh the data points, emphasizing the more recent data while giving lesser importance to older data. It helps smooth out the price data, potentially eliminating some of the noise.
I've personally found the KAMA smoothing to be most helpful but keen to hear of anyone's personal experiences and recommendations.
RSI divergence computations are based on the filtered price (or raw price if no filter is chosen) - the indicator calculates two RSIs:
- Fast RSI: With a default length of 5 periods.
- Slow RSI: With a default length of 14 periods.
The core functionality of this indicator is to compute the divergence between the Fast and Slow RSI. The divergence is plotted on the chart, with the color indicating its direction: white for positive divergence and red for negative.
RSI Divergence - Baby WhaleHey guys!
BabyWhale here!
I will open source my scripts, so everyone can use them and update.
In this RSI Divergence script I added Hidden Divergence (beta) as well.
This script will show you:
Bullish Divergence (green triangle)
Hidden Bullish Divergence (green circle)
Bearish Divergence (red triangle)
Hidden Bearish Divergence (red circle)
You can set the RSI values.
I recommend 60 / 40 or 70 / 30.
Last but not least, you can set alarms when a Divergence or Hidden Divergence is found.
Feedback is always welcome!
Credits to @Libertus, I used his script as inspiration.
Good luck with trading!
BabyWhale
RSI Divergence X Ichimoku Cloud X 200EMAHi all,
This script is a combination of the RSI Divergence Strategy combined with Ichimoku Cloud and 200 EMA .
A long position is entered only when the RSI identifies a bullish divergence (either regular or hidden), and that the Ichimoku Cloud is above the 200 EMA . This is to ensure that there is a confirmation of a bullish trend before an entry.
Similarly, a short position is entered only when the RSI identified a bearish divergence (either regular or hidden), and that the Ichimoku Cloud is below the 200 EMA . This is to ensure that there is a confirmation of a bearish trend before an entry.
I find that this script works best on Intraday charts.
This is just a simple script I built on my third attempt of backtesting strategies on TradingView. Do give it a go and let me know if you guys have any feedback or comments about it. Happy trading!
RSI Divergence Indicator strategyThis strategy is based on RSI divergence indicator.
RSI period setting 5
Go Long when Bull or Hidden Bull is shown
Exit when RSI goes above 75 OR when bear condition appears
RSI DivergenceSimple RSI Divergence with adjustable lookback period.
Highlights bars with higher price but lower RSI (bearish) or lower price but higher RSI (bullish) than the highest/lowest points in the lookback period.
RSI Divergence on 1-Hour with 15min & 5min CorrectionUsing the 15 minute timeframe, rsi divergence on the hourly chart is "tracked" by the 15 and 5 min rsi levels to watch for the hourly chart's rsi correction.
RSI Divergence 1-20 Candlesthis is a rsi divergence indicator used to mark divergence on the candle for knowing the trend
Element Squared RSI Divergence IndicatorRSI Divergence indicator developed by the team at Element Squared Private Wealth.
RSI Divergence Indicator (with alerts)Many have requested me for indicator version with alerts for the RSI Divergence strategy. Here is the one ...
Please note alert triggers in delay by number of bars defined in the settings. (same as strategy) ...
Bar color also changes when alert triggers ...
Yellow Bar shows BUY
Purple Bar shows EXIT ( Exit the Long position ... NO SHORTing )
On each Yellow Bar can be added to existing position
On each Purple Bar , exit partial position OR exit the whole position
Appreciate your feedback.
Warning
Use for education purpose only ...






















