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
| Feature | Description |
|---|---|
| Entry Conditions | 1 condition: RSI < 30 + Price < Lower Bollinger Band |
| Exit Conditions | 1 condition: RSI > 70 |
| Protection | No independent protection parameters, relies on hard stoploss |
| Timeframe | 1 hour |
| Dependencies | TA-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
| Feature | BbandRsi | BBRSI21 |
|---|---|---|
| Timeframe | 1h | 5m |
| RSI Entry Threshold | < 30 | < 21 |
| RSI Exit Threshold | > 70 | > 99 |
| ROI | 10% | 22.77% |
| Stoploss | -25% | -30% |
| Bollinger Std Dev | 2x | 3x |
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 Category | Specific Indicator | Parameters | Usage |
|---|---|---|---|
| Volatility | Bollinger Bands | 20 periods, 2 std dev | Price boundary judgment |
| Momentum | RSI | 14 periods | Overbought/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
- Simple and Clear Logic: Only 2 indicators, easy to understand and monitor
- Classic Thresholds: RSI 30/70 are traditional overbought/oversold thresholds
- Timeframe Friendly: 1-hour level suitable for most traders
- Low Computational Load: Few indicators, low hardware requirements
- Quick Turnover: 10% ROI exit, high capital utilization
⚠️ Limitations
- No Trend Filter: No EMA/SMA trend judgment, may lose consecutively in downtrends
- No BTC Correlation: Does not detect Bitcoin market trend
- Loose Stoploss Risk: -25% stoploss may cause significant losses in extreme conditions
- Single Exit Condition: Only RSI > 70 triggers exit, may exit trends too early
- No Trailing Stop: Trailing stop not enabled, may miss large trend profits
8. Recommended Usage Scenarios
| Market Environment | Recommended Configuration | Notes |
|---|---|---|
| Ranging Market | Default configuration | Mean reversion strategies best suited for ranging conditions |
| Uptrend | Default configuration | 10% ROI allows quick turnover |
| Downtrend | Pause or reduce position | No trend filter, prone to losses in downtrends |
| High Volatility | Keep default | Loose stoploss suitable for high volatility |
| Low Volatility | Lower ROI | Reduce 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 Type | Performance Rating | Reason 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
| Configuration | Recommended Value | Notes |
|---|---|---|
| Number of Pairs | 20-40 USDT pairs | 1h signal frequency is moderate |
| Max Open Trades | 3-6 orders | 1h level should not have too many positions |
| Position Mode | Fixed position | Recommend fixed position, control risk |
| Timeframe | 1h | Mandatory, 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 Pairs | Minimum RAM | Recommended RAM |
|---|---|---|
| 20-40 pairs | 512MB | 1GB |
| 40-80 pairs | 1GB | 2GB |
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:
- Simple and Elegant: Complete trading logic with only 2 indicators
- Classic Thresholds: RSI 30/70 validated by long-term market use
- Timeframe Friendly: 1-hour level suitable for most traders
- 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