Skip to main content

BbandRsi Strategy Analysis

Strategy Number: #4 (4th of 465 strategies)
Strategy Type: Bollinger Bands + RSI Mean Reversion
Timeframe: 1 hour (1h)


1. Strategy Overview​

BbandRsi is a classic mean reversion strategy ported by author Gert Wohlgemuth from the C# project Mynt to the Freqtrade platform. Similar to BBRSI21, but uses looser conditions and 1-hour timeframe, suitable for capturing larger-level fluctuations.

Core Features​

FeatureDescription
Entry Conditions1 condition: RSI < 30 + Price < Lower Bollinger Band
Exit Conditions1 condition: RSI > 70
ProtectionNo independent protection parameters, relies on hard stoploss
Timeframe1 hour
DependenciesTA-Lib, technical (qtpylib)

2. Configuration Analysis​

2.1 Base Risk Parameters​

# ROI exit table
minimal_roi = {
"0": 0.1 # Immediate exit: 10% profit
}

# Stoploss setting
stoploss = -0.25 # -25% hard stoploss

Design Logic:

  • Low ROI threshold: 10% to exit, indicating strategy追求 quick turnover
  • Loose stoploss: -25% hard stoploss gives ample fluctuation room, suitable for 1-hour level
  • No trailing stop: Relies on technical signals for exit

2.2 Order Type Configuration​

Uses Freqtrade default configuration (not explicitly defined in strategy).


3. Entry Conditions Explained​

3.1 Entry Logic​

# Entry conditions
dataframe.loc[
(
(dataframe["rsi"] < 30) # RSI below 30 (oversold)
& (dataframe["close"] < dataframe["bb_lowerband"]) # Price below lower Bollinger Band
),
"buy",
] = 1

Logic Analysis:

  • RSI Oversold: RSI < 30 is traditional oversold threshold
  • Lower Bollinger Band Break: Price breaks below 2 standard deviation Bollinger lower band
  • Dual Confirmation: Both conditions must be met to trigger entry

3.2 Comparison with BBRSI21​

FeatureBbandRsiBBRSI21
Timeframe1h5m
RSI Entry Threshold< 30< 21
RSI Exit Threshold> 70> 99
ROI10%22.77%
Stoploss-25%-30%
Bollinger Std Dev2x3x

Conclusion: BbandRsi has looser conditions, suitable for capturing 1-hour level fluctuations.


4. Exit Logic Explained​

4.1 Exit Conditions​

# Exit conditions
dataframe.loc[
(dataframe["rsi"] > 70), # RSI above 70 (overbought)
"sell",
] = 1

Logic Analysis:

  • RSI Overbought: RSI > 70 is traditional overbought threshold
  • Single Condition: Only RSI overbought triggers exit, no Bollinger upper band requirement
  • Flexible Exit: More flexible compared to strict entry conditions

4.2 ROI Exit​

minimal_roi = {"0": 0.1}  # 10% profit immediate exit

Note: Low threshold ROI,追求 quick turnover.


5. Technical Indicator System​

5.1 Core Indicators​

Indicator CategorySpecific IndicatorParametersUsage
VolatilityBollinger Bands20 periods, 2 std devPrice boundary judgment
MomentumRSI14 periodsOverbought/oversold judgment

5.2 Indicator Calculation​

# RSI calculation
dataframe["rsi"] = ta.RSI(dataframe, timeperiod=14)

# Bollinger Bands calculation (20 periods, 2 std dev)
bollinger = qtpylib.bollinger_bands(
qtpylib.typical_price(dataframe), window=20, stds=2
)
dataframe["bb_lowerband"] = bollinger["lower"]
dataframe["bb_middleband"] = bollinger["mid"]
dataframe["bb_upperband"] = bollinger["upper"]

6. Risk Management Features​

6.1 Hard Stoploss Protection​

stoploss = -0.25  # -25%

Note: Loose stoploss, suitable for 1-hour level fluctuation space.

6.2 Timeframe Advantages​

1-hour Timeframe Characteristics:

  • More stable signals, fewer false signals
  • Suitable for office workers, no need for frequent monitoring
  • Each candle represents 1 hour, only 24 candles per day

7. Strategy Strengths and Limitations​

✅ Strengths​

  1. Simple and Clear Logic: Only 2 indicators, easy to understand and monitor
  2. Classic Thresholds: RSI 30/70 are traditional overbought/oversold thresholds
  3. Timeframe Friendly: 1-hour level suitable for most traders
  4. Low Computational Load: Few indicators, low hardware requirements
  5. Quick Turnover: 10% ROI exit, high capital utilization

⚠️ Limitations​

  1. No Trend Filter: No EMA/SMA trend judgment, may lose consecutively in downtrends
  2. No BTC Correlation: Does not detect Bitcoin market trend
  3. Loose Stoploss Risk: -25% stoploss may cause significant losses in extreme conditions
  4. Single Exit Condition: Only RSI > 70 triggers exit, may exit trends too early
  5. No Trailing Stop: Trailing stop not enabled, may miss large trend profits

Market EnvironmentRecommended ConfigurationNotes
Ranging MarketDefault configurationMean reversion strategies best suited for ranging conditions
UptrendDefault configuration10% ROI allows quick turnover
DowntrendPause or reduce positionNo trend filter, prone to losses in downtrends
High VolatilityKeep defaultLoose stoploss suitable for high volatility
Low VolatilityLower ROIReduce ROI threshold to 5-8%

9. Suitable Market Environments Explained​

BbandRsi is a classic mean reversion strategy based on the core assumption that "price fluctuates around the mean".

9.1 Strategy Core Logic​

  • Mean Reversion Philosophy: After price falls below lower Bollinger Band, likely to revert to middle band
  • RSI Oversold Confirmation: RSI < 30 confirms pessimistic market sentiment, high rebound probability
  • Quick Exit: Exit when RSI > 70, don't get greedy

9.2 Performance in Different Market Environments​

Market TypePerformance RatingReason Analysis
📈 Slow Bull/Ranging Upward★★★★☆ (Good)Mean reversion + uptrend, performs well
🔄 Wide Ranging★★★★★ (Best)Ranging conditions are ideal for mean reversion strategies
📉 One-Way Crash★★☆☆☆ (Poor)No trend filter, may continuously catch falling knives
⚡️ Extreme Sideways★★★☆☆ (Neutral)Volatility too small, signals reduce but risk also low

9.3 Key Configuration Recommendations​

ConfigurationRecommended ValueNotes
Number of Pairs20-40 USDT pairs1h signal frequency is moderate
Max Open Trades3-6 orders1h level should not have too many positions
Position ModeFixed positionRecommend fixed position, control risk
Timeframe1hMandatory, cannot be changed

10. Important Reminder: Timeframe Selection​

10.1 Low Learning Curve​

Strategy has only about 50 lines of code, clear logic, suitable for beginners.

10.2 Low Hardware Requirements​

Only calculates RSI and Bollinger Bands, extremely low VPS requirements:

Number of PairsMinimum RAMRecommended RAM
20-40 pairs512MB1GB
40-80 pairs1GB2GB

10.3 1-Hour Timeframe Advantages​

  • Stable Signals: 1h level has fewer false signals than 5m
  • Suitable for Office Workers: No need for frequent monitoring
  • Low Trading Costs: Low trading frequency, less fees
  • Reliable Backtest: 1h data quality more reliable than 5m

10.4 Manual Trading Recommendations​

Manual traders can reference this strategy's signals:

  • RSI < 30 + Price < Lower Bollinger Band → Consider buying
  • RSI > 70 → Consider selling
  • Combine with BTC market trend analysis

11. Summary​

BbandRsi is a classic mean reversion strategy template, its core value lies in:

  1. Simple and Elegant: Complete trading logic with only 2 indicators
  2. Classic Thresholds: RSI 30/70 validated by long-term market use
  3. Timeframe Friendly: 1-hour level suitable for most traders
  4. Low Resource Consumption: Small computational load, suitable for low-spec VPS

For quantitative traders, this is an excellent entry-level strategy. Recommendations:

  • Use as an introductory case for mean reversion strategies
  • Can add trend filters, BTC correlation, and other protection mechanisms
  • Adjust ROI and stoploss parameters based on market volatility
  • Consider adding trailing stop for improved profit protection