OPEN-SOURCE SCRIPT

RSI + BB / Owl of Profit

RSI + Bollinger Bands Strategy

This strategy combines the Relative Strength Index (RSI) and Bollinger Bands (BB) to identify overbought and oversold conditions for high-probability trade setups.

Features:
Bollinger Bands (BB):

Basis Line: A 20-period Simple Moving Average (default).
Upper Band: Basis + 2 standard deviations of the closing price.
Lower Band: Basis - 2 standard deviations of the closing price.
RSI (Relative Strength Index):

Length: 14 periods (default).
Overbought Level: 70 (default).
Oversold Level: 30 (default).
Entry and Exit Logic:
Long Condition:

RSI crosses above the oversold level (30).
Price touches or drops below the lower Bollinger Band.
Short Condition:

RSI crosses below the overbought level (70).
Price touches or exceeds the upper Bollinger Band.
Exit Long:

RSI crosses above the overbought level (70).
OR price crosses above the BB Basis line.
Exit Short:

RSI crosses below the oversold level (30).
OR price crosses below the BB Basis line.
Visualization:
Bollinger Bands:

Upper and lower bands are displayed in blue with a shaded fill for easier trend identification.
The basis line is plotted in orange.
RSI:

RSI is displayed on a separate pane with horizontal lines at overbought (70) and oversold (30) levels.
RSI line is plotted in purple for clear visualization.
Alerts:
Not included but can be added for buy and sell conditions to ensure no trade opportunity is missed.
This strategy is designed for traders who want to combine momentum and volatility to identify high-probability reversal zones. Use it for backtesting and fine-tuning to suit your trading preferences.

Visit my website for more tools and strategies: bybitindicators.com

Happy trading!

Aviso legal