BBRSI Strategy In-Depth Analysis
Strategy ID: #424 (424th of 465 strategies)
Strategy Type: Bollinger Band + RSI Dual Indicator Reversal Strategy
Time Frame: 4 hours (4h)
I. Strategy Overview
BBRSI is a classic Bollinger Band and RSI combination reversal strategy, using a 4-hour timeframe for medium-to-long-term trading. The strategy logic is concise and clear, using Bollinger Bands to determine price position, RSI to determine momentum status, buying at extreme oversold and selling at extreme overbought, suitable for trend reversal trading.
Core Characteristics
| Feature | Description |
|---|---|
| Buy Conditions | 1 core buy signal (RSI + Bollinger Band oversold combination) |
| Sell Conditions | 1 core sell signal (RSI + Bollinger Band overbought combination) + Tiered ROI |
| Protection Mechanism | Fixed stop loss -36% + Trailing stop |
| Time Frame | 4 hours (4h) |
| Dependencies | talib, qtpylib |
II. Strategy Configuration Analysis
2.1 Basic Risk Parameters
# ROI exit table
minimal_roi = {
"0": 0.215474, # Immediate profit target ~21.5%
"21": 0.054919, # After 21 hours drops to ~5.5%
"48": 0.013038, # After 48 hours drops to ~1.3%
"125": 0 # After 125 hours accepts 0 profit exit
}
# Stop loss setting
stoploss = -0.360367 # Fixed stop loss ~-36%
# Trailing stop
trailing_stop = True
Design Rationale:
- Tiered ROI: High profit expectation initially (21.5%), becomes more conservative as holding time increases
- After 125 hours, accepts breakeven exit to avoid long-term capital occupation
- Fixed stop loss -36%, allowing larger drawdown space
- Trailing stop enabled, locking in partial profits
2.2 Order Type Configuration
order_types = {
'buy': 'limit', # Buy using limit order
'sell': 'limit', # Sell using limit order
'stoploss': 'market', # Stop loss using market order (fast execution)
'stoploss_on_exchange': False
}
order_time_in_force = {
'buy': 'gtc', # Buy order good till cancelled
'sell': 'gtc' # Sell order good till cancelled
}
III. Buy Conditions Detailed Analysis
3.1 Core Buy Signal
The strategy uses a single buy condition with concise logic:
# Buy condition
(
(dataframe['rsi'] > 25) &
(dataframe['close'] < dataframe['bb_lowerband_1sd'])
)
Logic Breakdown:
- RSI > 25: RSI is in oversold territory but not at extreme (25 is oversold threshold)
- Close price < BB lower band (1SD): Price breaks below Bollinger Band lower band (1 standard deviation)
Design Intent:
- RSI > 25 ensures: Not in extreme panic state, some momentum remains
- Price below BB lower band: Price is at relatively low position, may rebound
- Combined use: Avoids single indicator false signals
3.2 Buy Signal Trigger Conditions
| Indicator | Condition | Description |
|---|---|---|
| RSI | > 25 | Momentum not at extreme oversold |
| Price Position | < BB lower band 1SD | Price at relatively low position |
IV. Sell Logic Detailed Analysis
4.1 Tiered ROI System
The strategy uses a 4-level ROI exit mechanism:
Holding Time Target Profit
────────────────────────
0 hours ~21.5%
21 hours ~5.5%
48 hours ~1.3%
125 hours 0%
Design Rationale:
- Initial High Expectation: Expect to catch significant reversal when just bought (21.5%)
- Gradual Reduction: Profit expectation becomes more conservative as holding time increases
- Final Exit: After 125 hours (~5 days) accepts breakeven exit
4.2 Core Sell Signal
# Sell condition
(
(dataframe['rsi'] > 95) &
(dataframe['close'] > dataframe['bb_upperband_1sd'])
)
Logic Breakdown:
- RSI > 95: Momentum is at extreme overbought state
- Close price > BB upper band (1SD): Price breaks above Bollinger Band upper band
Design Intent:
- RSI > 95: Momentum overly strong, may reverse
- Price above BB upper band: Price at relatively high position
- Combined signal: Confirms overbought reversal timing
4.3 Trailing Stop Mechanism
The strategy enables trailing stop to protect profits after gaining:
trailing_stop = True
Working Mechanism:
- When price rises, stop loss level moves up accordingly
- When price retraces and hits stop loss level, triggers sell
- Locks in partial profits, avoids significant drawdown
V. Technical Indicator System
5.1 Core Indicators
| Indicator Category | Specific Indicators | Usage |
|---|---|---|
| Momentum Indicator | RSI (14) | Overbought/oversold determination |
| Volatility Indicator | BB (20, 1SD), BB (20, 4SD) | Price position determination |
5.2 Indicator Calculation Details
RSI Indicator:
dataframe['rsi'] = ta.RSI(dataframe)
# Default period 14
Bollinger Band Indicator:
# 1 standard deviation Bollinger Band (for signals)
bollinger_1sd = qtpylib.bollinger_bands(qtpylib.typical_price(dataframe), window=20, stds=1)
dataframe['bb_upperband_1sd'] = bollinger_1sd['upper']
dataframe['bb_lowerband_1sd'] = bollinger_1sd['lower']
# 4 standard deviation Bollinger Band (reserve)
bollinger_4sd = qtpylib.bollinger_bands(qtpylib.typical_price(dataframe), window=20, stds=4)
dataframe['bb_lowerband_4sd'] = bollinger_4sd['lower']
VI. Risk Management Features
6.1 Stop Loss Design
| Stop Loss Type | Parameter Value | Description |
|---|---|---|
| Fixed Stop Loss | -36% | Allows larger drawdown space |
| Trailing Stop | Enabled | Protects profits after gaining |
Design Philosophy:
- -36% stop loss: 4-hour timeframe allows larger volatility space
- Trailing stop: Locks in profits, prevents drawdown from eating gains
6.2 Tiered ROI Design
| Holding Time | Target Profit | Risk Level |
|---|---|---|
| 0-21 hours | 21.5% | High expectation, catching reversal |
| 21-48 hours | 5.5% | Medium expectation, reasonable profit |
| 48-125 hours | 1.3% | Low expectation, breakeven with small profit |
| 125+ hours | 0% | Accept breakeven, release capital |
VII. Strategy Advantages and Limitations
✅ Advantages
- Concise Logic: Single buy/sell signal, easy to understand and maintain
- Classic Combination: RSI + BB is a classic reversal signal combination, relatively reliable
- Medium-to-Long-Term Perspective: 4-hour timeframe reduces noise, catches trend reversals
- Trailing Stop: Protects profits, avoids significant drawdown
- Few Parameters: No complex optimization, reduces overfitting risk
⚠️ Limitations
- Single Signal: Only one buy/sell condition, limited adaptability
- Wide Stop Loss: -36% stop loss may lead to larger losses
- Reversal Dependent: Strategy depends on price reversal, performs poorly in sustained trends
- Sparse Signals: 4-hour timeframe, low signal frequency
- Extreme Markets: RSI > 95 and < 25 may miss opportunities
VIII. Applicable Scenario Recommendations
| Market Environment | Recommended Configuration | Description |
|---|---|---|
| Oscillating Reversal | Default configuration | Catch reversals within oscillation range |
| Trend Pullback | Default configuration | Pullback reversal opportunities in trend |
| One-Way Trend | Pause use | Reversal signals may fail during sustained trends |
| Extreme Volatility | Adjust stop loss | Widen stop loss to avoid being swept |
IX. Applicable Market Environment Detailed Analysis
BBRSI is a typical medium-to-long-term reversal strategy. Based on its code architecture and classic indicator combination, it is most suitable for oscillating range or trend pullback reversal markets, while performing poorly in sustained one-way trends.
9.1 Strategy Core Logic
- Bollinger Band Positioning: Price is at extreme position when breaking band boundaries
- RSI Momentum Validation: RSI extreme values confirm momentum reversal signals
- Reversal Expectation: Expect price to return to normal range from extreme positions
- Medium-to-Long-Term Perspective: 4-hour timeframe catches larger reversals
9.2 Performance in Different Market Environments
| Market Type | Performance Rating | Reason Analysis |
|---|---|---|
| 📈 Oscillating Range | ⭐⭐⭐⭐⭐ | Price moves back and forth within BB range, reversal signals effective |
| 🔄 Trend Pullback | ⭐⭐⭐⭐☆ | Buy triggers during trend pullback, continues rising with trend |
| 📉 One-Way Downtrend | ⭐⭐☆☆☆ | Buy signals may trigger too early during sustained decline |
| ⚡️ One-Way Uptrend | ⭐☆☆☆☆ | Cannot buy during uptrend, misses opportunities |
9.3 Key Configuration Recommendations
| Configuration Item | Recommended Value | Description |
|---|---|---|
| Number of Pairs | 3-10 pairs | Avoid too sparse signals |
| Timeframe | 4h | Default configuration, modification not recommended |
| Stop Loss Adjustment | Based on volatility | High volatility pairs can widen stop loss |
X. Important Reminder: Risks of Reversal Strategy
10.1 Reversal Timing
- Buy Timing: Price breaks below BB lower band + RSI > 25
- Sell Timing: Price breaks above BB upper band + RSI > 95
- Risk: Extreme positions may continue to extend, reversal may not occur immediately
10.2 Stop Loss Space
- Fixed stop loss -36%, allows larger drawdown
- 4-hour timeframe has larger volatility, needs sufficient stop loss space
- Trailing stop protects profits after enabling
10.3 Differences Between Backtest and Live Trading
- Backtest: Historical reversal signals trigger perfectly
- Live Trading: Reversal may delay or fail
- Recommendation: Verify signal frequency and validity with simulation first
10.4 Advice for Manual Traders
This strategy has simple logic, manual trading is feasible:
- Monitor RSI and BB indicators
- Wait for signals on 4-hour charts
- Pay attention to stop loss and trailing stop settings
XI. Summary
BBRSI is a classic Bollinger Band + RSI reversal strategy with concise logic, easy to understand. Its core value lies in:
- Clear Signals: Single buy/sell condition, easy to execute
- Classic Combination: RSI + BB is a proven reversal signal
- Medium-to-Long-Term Perspective: 4-hour timeframe reduces noise, catches larger reversals
- Controlled Risk: Tiered ROI + trailing stop protects profits
For quantitative traders, this is a strategy suitable for beginners or as part of a combination strategy. It is recommended to use with other strategies to cover more market conditions.