OPEN-SOURCE SCRIPT
RSI Oscillator with MA and Squeeze

Description for the Pine Script "RSI Oscillator with MA and Squeeze"
Script Name: RSI Oscillator with MA and Squeeze
Author: h_moritz
Description:
This Pine Script™ indicator was developed as a practice project while following the mastery course from ZenAndTheArtOfTrading. It combines the Relative Strength Index (RSI) with various moving averages and includes detection of squeeze conditions to help traders identify potential trading opportunities.
While the coding was learned by ZenAndTheArtOfTrading - I personally use this set of rules in my own trading strategy, so it’s designed to be a practical tool based on my real trading experience. I wanted to create an indicator that has all these features combined in one.
Features:
RSI Calculation:
Calculates the RSI (Relative Strength Index) over a user-defined period.
Customizable overbought and oversold levels (default values are 80 and 20, respectively).
Moving Averages:
Users can select from four different types of moving averages (SMA, EMA, WMA, VWMA) to smooth the RSI values.
The length of the moving average is customizable.
Squeeze Conditions:
Identifies "Mild Squeeze" and "Strong Squeeze" conditions using Bollinger Bands and Keltner Channels.
A "Mild Squeeze" occurs when the Bollinger Bands are within the Keltner Channels.
A "Strong Squeeze" is identified when a "Mild Squeeze" is present, and the 20-period range is the lowest.
Candle Pattern Detection:
Uses the ZenLibrary to detect bullish and bearish engulfing candle patterns.
Generates buy or sell signals based on these patterns and RSI conditions.
Visual Indicators:
Marks overbought, oversold, and midline levels with horizontal lines.
Uses background colors to indicate buy or sell signals.
Highlights squeeze conditions with different background colors (light blue for Mild Squeeze and dark blue for Strong Squeeze).
Alerts:
Alerts can be set up for buy and sell signals based on RSI exhaustion setups.
Additional alerts are available for Mild and Strong Squeeze conditions.
Usage:
This indicator can be added to the TradingView chart to assist traders in identifying potential trading opportunities based on RSI movements, moving average trends, and squeeze conditions. It provides a visual representation of these indicators along with alerts to notify traders of significant events.
I use this indicator as part of my own trading strategy, so it's built with practical application in mind and designed to be a useful tool for traders.
Customization:
Users can customize the following inputs to tailor the indicator to their trading strategy:
Lookback period for candle patterns.
RSI length and thresholds for overbought/oversold levels.
Length and type of the moving average applied to the RSI.
Parameters for Bollinger Bands and Keltner Channels used in squeeze detection.
Disclaimer:
This script is a practice project and should be used for educational purposes. Trading involves substantial risk, and it's important to perform thorough research and consult with a financial advisor before making any trading decisions.
License:
This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org/MPL/2.0/.
Script Name: RSI Oscillator with MA and Squeeze
Author: h_moritz
Description:
This Pine Script™ indicator was developed as a practice project while following the mastery course from ZenAndTheArtOfTrading. It combines the Relative Strength Index (RSI) with various moving averages and includes detection of squeeze conditions to help traders identify potential trading opportunities.
While the coding was learned by ZenAndTheArtOfTrading - I personally use this set of rules in my own trading strategy, so it’s designed to be a practical tool based on my real trading experience. I wanted to create an indicator that has all these features combined in one.
Features:
RSI Calculation:
Calculates the RSI (Relative Strength Index) over a user-defined period.
Customizable overbought and oversold levels (default values are 80 and 20, respectively).
Moving Averages:
Users can select from four different types of moving averages (SMA, EMA, WMA, VWMA) to smooth the RSI values.
The length of the moving average is customizable.
Squeeze Conditions:
Identifies "Mild Squeeze" and "Strong Squeeze" conditions using Bollinger Bands and Keltner Channels.
A "Mild Squeeze" occurs when the Bollinger Bands are within the Keltner Channels.
A "Strong Squeeze" is identified when a "Mild Squeeze" is present, and the 20-period range is the lowest.
Candle Pattern Detection:
Uses the ZenLibrary to detect bullish and bearish engulfing candle patterns.
Generates buy or sell signals based on these patterns and RSI conditions.
Visual Indicators:
Marks overbought, oversold, and midline levels with horizontal lines.
Uses background colors to indicate buy or sell signals.
Highlights squeeze conditions with different background colors (light blue for Mild Squeeze and dark blue for Strong Squeeze).
Alerts:
Alerts can be set up for buy and sell signals based on RSI exhaustion setups.
Additional alerts are available for Mild and Strong Squeeze conditions.
Usage:
This indicator can be added to the TradingView chart to assist traders in identifying potential trading opportunities based on RSI movements, moving average trends, and squeeze conditions. It provides a visual representation of these indicators along with alerts to notify traders of significant events.
I use this indicator as part of my own trading strategy, so it's built with practical application in mind and designed to be a useful tool for traders.
Customization:
Users can customize the following inputs to tailor the indicator to their trading strategy:
Lookback period for candle patterns.
RSI length and thresholds for overbought/oversold levels.
Length and type of the moving average applied to the RSI.
Parameters for Bollinger Bands and Keltner Channels used in squeeze detection.
Disclaimer:
This script is a practice project and should be used for educational purposes. Trading involves substantial risk, and it's important to perform thorough research and consult with a financial advisor before making any trading decisions.
License:
This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at mozilla.org/MPL/2.0/.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.