Skip to main content

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

FeatureDescription
Buy Conditions1 core buy signal (RSI + Bollinger Band oversold combination)
Sell Conditions1 core sell signal (RSI + Bollinger Band overbought combination) + Tiered ROI
Protection MechanismFixed stop loss -36% + Trailing stop
Time Frame4 hours (4h)
Dependenciestalib, 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

IndicatorConditionDescription
RSI> 25Momentum not at extreme oversold
Price Position< BB lower band 1SDPrice 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 CategorySpecific IndicatorsUsage
Momentum IndicatorRSI (14)Overbought/oversold determination
Volatility IndicatorBB (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 TypeParameter ValueDescription
Fixed Stop Loss-36%Allows larger drawdown space
Trailing StopEnabledProtects 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 TimeTarget ProfitRisk Level
0-21 hours21.5%High expectation, catching reversal
21-48 hours5.5%Medium expectation, reasonable profit
48-125 hours1.3%Low expectation, breakeven with small profit
125+ hours0%Accept breakeven, release capital

VII. Strategy Advantages and Limitations

✅ Advantages

  1. Concise Logic: Single buy/sell signal, easy to understand and maintain
  2. Classic Combination: RSI + BB is a classic reversal signal combination, relatively reliable
  3. Medium-to-Long-Term Perspective: 4-hour timeframe reduces noise, catches trend reversals
  4. Trailing Stop: Protects profits, avoids significant drawdown
  5. Few Parameters: No complex optimization, reduces overfitting risk

⚠️ Limitations

  1. Single Signal: Only one buy/sell condition, limited adaptability
  2. Wide Stop Loss: -36% stop loss may lead to larger losses
  3. Reversal Dependent: Strategy depends on price reversal, performs poorly in sustained trends
  4. Sparse Signals: 4-hour timeframe, low signal frequency
  5. Extreme Markets: RSI > 95 and < 25 may miss opportunities

VIII. Applicable Scenario Recommendations

Market EnvironmentRecommended ConfigurationDescription
Oscillating ReversalDefault configurationCatch reversals within oscillation range
Trend PullbackDefault configurationPullback reversal opportunities in trend
One-Way TrendPause useReversal signals may fail during sustained trends
Extreme VolatilityAdjust stop lossWiden 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 TypePerformance RatingReason 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 ItemRecommended ValueDescription
Number of Pairs3-10 pairsAvoid too sparse signals
Timeframe4hDefault configuration, modification not recommended
Stop Loss AdjustmentBased on volatilityHigh 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:

  1. Clear Signals: Single buy/sell condition, easy to execute
  2. Classic Combination: RSI + BB is a proven reversal signal
  3. Medium-to-Long-Term Perspective: 4-hour timeframe reduces noise, catches larger reversals
  4. 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.