BB_RPB_TSL_SMA_Tranz_TB_MOD Strategy In-Depth Analysis
Strategy Number: #449 (449th out of 465 strategies)
Strategy Type: Multi-condition Bollinger Band Pullback + Dynamic Trailing Stop
Timeframes: 5-minute (5m) + 1-hour (1h) + 15-minute (15m)
I. Strategy Overview
BB_RPB_TSL_SMA_Tranz_TB_MOD is a composite strategy based on Bollinger Bands and the Real Pull Back (RPB) concept. It combines multiple classic buy signals and employs a dynamic trailing stop mechanism for risk management. This strategy is an advanced variant of the BB_RPB_TSL series, featuring SMA offsets and more sophisticated sell logic.
Core Features
| Feature | Description |
|---|---|
| Buy Conditions | 40+ independent buy signals covering pullback, breakout, oscillation, and other scenarios |
| Sell Conditions | 12-tier graduated profit-taking + multi-scenario dynamic exits |
| Protection Mechanisms | 2 protection parameter sets (cool-down period, low-profit pair protection) |
| Timeframes | Main timeframe 5m, informative timeframes 1h + 15m |
| Dependencies | pandas_ta, technical, freqtrade, numpy, talib |
II. Strategy Configuration Analysis
2.1 Base Risk Parameters
# ROI Exit Table
minimal_roi = {
"0": 0.2, # Exit immediately at 20% profit
"30": 0.1, # Exit at 10% after 30 minutes
"60": 0.05, # Exit at 5% after 60 minutes
"90": 0.03, # Exit at 3% after 90 minutes
"120": 0.02, # Exit at 2% after 120 minutes
"150": 0.01, # Exit at 1% after 150 minutes
"180": 0.005, # Exit at 0.5% after 180 minutes
}
# Stop Loss Settings
stoploss = -0.15 # 15% fixed stop loss (as final safety net)
# Enable Custom Stop Loss
use_custom_stoploss = True
Design Philosophy:
- ROI table uses a递减 design, encouraging short-term holding while allowing long-term positions
- Fixed stop loss serves as final safety net; actual stop loss is dynamically controlled by custom stop loss
- Graduated profit targets reduce greed and lock in gains progressively
2.2 Custom Stop Loss Mechanism
def custom_stoploss(self, pair, trade, current_time, current_rate, current_profit, **kwargs):
if (current_profit > 0.2):
return 0.05 # Move stop loss to 5% when profit >20%
elif (current_profit > 0.1):
return 0.03 # Move stop loss to 3% when profit >10%
elif (current_profit > 0.06):
return 0.02 # Move stop loss to 2% when profit >6%
elif (current_profit > 0.03):
return 0.015 # Move stop loss to 1.5% when profit >3%
return 1 # Use fixed stop loss by default
III. Buy Conditions Detailed Analysis
3.1 Core Buy Signal Classification
The strategy's buy conditions can be categorized into the following groups:
| Condition Group | Number of Conditions | Core Logic |
|---|---|---|
| Bollinger Band Pullback | 5 | Price touches BB lower band, suitable for oversold bounce |
| Trend Pullback | 8 | Seek pullback buy opportunities in uptrend |
| Oscillation Breakout | 6 | BB width contraction followed by breakout, capturing volatility changes |
| NFI Series Signals | 20+ | Deep pullback signals from NFI strategy |
| Momentum Reversal | 5 | CTI, RSI and other momentum indicator extreme reversals |
3.2 Typical Buy Condition Examples
Condition #1: Bollinger Band Pullback (bb)
is_BB_checked = (
(rmi < 49) & # RMI Relative Momentum Index low
(cci <= -116) & # CCI Commodity Channel Index oversold
(srsi_fk < 32) # Stochastic RSI fast line low
) & (
(bb_delta > 0.025) & # Sufficient spacing between BB lower band and lower band 3
(bb_width > 0.095) & # BB width sufficient (not extremely contracted)
(close < bb_lowerband3 * 0.999) # Price touches BB 3 standard deviation lower band
)
Condition #2: Local Uptrend Pullback (local_uptrend)
is_local_uptrend = (
(ema_26 > ema_12) & # Short-term MA above long-term MA
(ema_26 - ema_12 > open * 0.026) & # MA gap sufficient (clear trend)
(close < bb_lowerband2 * 0.999) & # Price touches BB 2 standard deviation lower band
(closedelta > close * 0.018) # Price volatility sufficient
)
Condition #3: EWO Extreme Reversal (ewo)
is_ewo = (
(rsi_fast < 44) & # Fast RSI low
(close < ema_8 * 0.935) & # Price below 8-period EMA
(EWO > -5.0) & # Elliott Wave Oscillator extreme
(rsi < 23) # RSI oversold
)
3.3 Auxiliary Filter Conditions
# Additional Check Conditions
is_additional_check = (
(roc_1h < 86) & # 1-hour ROC should not be too high
(bb_width_1h < 0.954) # 1-hour BB width moderate
)
IV. Sell Logic Detailed Analysis
4.1 Graduated Profit-Taking System
The strategy employs a 12-tier graduated profit-taking mechanism:
Profit Range RSI Threshold Signal Name
─────────────────────────────────────────────────────
> 20% < 34 signal_profit_11
10% ~ 20% < 42 signal_profit_10
9% ~ 10% < 54 signal_profit_9
8% ~ 9% < 55 signal_profit_8
7% ~ 8% < 54 signal_profit_7
6% ~ 7% < 45 signal_profit_6
5% ~ 6% < 43 signal_profit_5
4% ~ 5% < 42 signal_profit_4
3% ~ 4% < 37 signal_profit_3
2% ~ 3% < 35 signal_profit_2
1% ~ 2% < 35 signal_profit_1
0% ~ 1% < 34 signal_profit_0
4.2 Special Sell Scenarios
| Scenario | Trigger Condition | Signal Name |
|---|---|---|
| Below EMA200 Profit | Price < EMA200 and profit target met | signal_profit_u_* |
| Pump Then Pullback | 48h gain exceeds threshold | signal_profit_p_* |
| SMA Downtrend | SMA200 continuously declining | signal_profit_d_* |
| Trailing Stop | Price pullback from highest point | signal_profit_t_* |
| Long-term Hold Stop Loss | Position held too long while at loss | signal_stoploss_* |
4.3 Base Sell Signals (8 Switchable)
# Sell Signal Switches
sell_condition_1_enable = True # RSI + BB sell
sell_condition_2_enable = True # Dual-timeframe RSI sell
sell_condition_3_enable = True # EMA relative position sell
sell_condition_4_enable = True # RSI overbought sell
sell_condition_5_enable = True # 1-hour RSI sell
sell_condition_6_enable = True # BB relative position sell
sell_condition_7_enable = True # Custom profit sell
sell_condition_8_enable = True # Custom RSI sell
V. Technical Indicator System
5.1 Core Indicators
| Indicator Category | Specific Indicators | Usage |
|---|---|---|
| Trend Indicators | EMA (4, 8, 12, 13, 16, 20, 26, 50, 100, 200) | Trend direction judgment |
| Trend Indicators | SMA (9, 15, 20, 21, 28, 30, 75, 200) | Support/resistance levels |
| Oscillator Indicators | RSI (4, 14, 20), StochRSI | Overbought/oversold judgment |
| Volatility Indicators | Bollinger Bands (20, 2), (20, 3), (40, 2) | Volatility channels |
| Momentum Indicators | CCI, CMO, CTI, Williams %R | Momentum extremes |
| Volume Indicators | CMF, MFI, Volume Mean | Volume-price analysis |
| Composite Indicators | EWO (Elliott Wave Oscillator), PMAX | Trend strength |
5.2 Informative Timeframe Indicators (1h + 15m)
The strategy uses multi-timeframe confirmation mechanism:
1-hour Timeframe:
- EMA 200 trend direction
- RSI 14 overbought/oversold
- CTI momentum indicator
- Williams %R (96, 480)
- BB width
15-minute Timeframe:
- RSI 14
- EMA series
- BB 40 (2 standard deviations)
- Williams %R (14, 64, 96)
- CCI
VI. Risk Management Features
6.1 Protection Mechanisms
def protections(self):
return [
{
"method": "CooldownPeriod",
"stop_duration_candles": 2 # Cool down 2 candles after trade
},
{
"method": "LowProfitPairs",
"lookback_period_candles": 48,
"trade_limit": 1,
"stop_duration": 14,
"required_profit": 0.04 # Low-profit pair protection
}
]
6.2 Slippage Protection
def confirm_trade_entry(self, pair, order_type, amount, rate, time_in_force, **kwargs):
slippage = ((rate / close) - 1) * 100
if slippage < max_slip: # Default 0.983%
return True
return False
6.3 Pump Protection
The strategy has built-in pump detection mechanism to avoid chasing highs:
# 48-hour gain protection
safe_pump_48 = (oc_pct_change_48 < threshold) | (range_maxgap_adjusted > range_height)
# Multi-level pump detection
safe_pump_24_10, safe_pump_36_10, safe_pump_48_10 # Level 10
safe_pump_24_20, safe_pump_36_20, safe_pump_48_20 # Level 20
# ... and multiple other levels
VII. Strategy Advantages and Limitations
✅ Advantages
- Rich Signals: 40+ buy conditions cover multiple market scenarios, improving signal capture rate
- Comprehensive Risk Control: 12-tier graduated profit-taking + dynamic stop loss + protection mechanisms
- Multi-timeframe Confirmation: Uses 1h and 15m timeframes to filter false signals
- Prevents Chasing Highs: Pump protection mechanism avoids buying at peaks
- Slippage Protection: Entry confirmation mechanism prevents excessive slippage
⚠️ Limitations
- Numerous Parameters: Over 200 optimizable parameters, prone to overfitting
- Computationally Intensive: Multi-timeframe and multi-indicator calculations demand high hardware requirements
- Backtest Traps: Complex strategies may perform excellently in backtests but poorly in live trading
- Steep Learning Curve: Understanding all signals requires significant time investment
VIII. Applicable Scenario Recommendations
| Market Environment | Recommended Configuration | Description |
|---|---|---|
| Slow Bull Trend | Default configuration | Trend pullback signals perform excellently |
| Wide Oscillation | Enable more pullback signals | Bollinger Band pullback signals work well |
| Post-Crash Rebound | Enable NFI series | Deep pullback signals capture rebounds |
| Rapid Rise | Use with caution | Pump protection may limit entries |
| Sideways Consolidation | Reduce trading frequency | False signals increase, need filtering |
IX. Applicable Market Environment Detailed Analysis
BB_RPB_TSL_SMA_Tranz_TB_MOD is an advanced variant of the BB_RPB_TSL series. Based on its code architecture and community experience, it is best suited for trend pullback markets, and performs poorly in single-sided pumps or deep bear markets.
9.1 Strategy Core Logic
- Multi-signal Combination: Enters on pullbacks through numerous buy condition combinations
- Graduated Profit-Taking: Higher profits have looser take-profit conditions, letting profits run
- Dynamic Stop Loss: Stop loss position gradually moves up as profit increases
- Pump Protection: Avoids chasing highs after short-term significant gains
9.2 Performance in Different Market Environments
| Market Type | Performance Rating | Reason Analysis |
|---|---|---|
| 📈 Slow Bull Trend | ⭐⭐⭐⭐⭐ | Pullback buy signals are precise, profit-taking mechanism is reasonable |
| 🔄 Wide Oscillation | ⭐⭐⭐⭐☆ | Bollinger Band signals are effective, but fees may increase |
| 📉 Single-sided Decline | ⭐⭐☆☆☆ | Many buy signals trigger, but frequent stop losses |
| ⚡️ Rapid Pump | ⭐☆☆☆☆ | Pump protection limits entries, may miss opportunities |
9.3 Key Configuration Recommendations
| Configuration Item | Recommended Value | Description |
|---|---|---|
| Stop Loss | -0.15 | As final safety net |
| Minimum ROI | 0.005 | Minimum profit target |
| Cool-down Period | 2 candles | Prevents consecutive trading |
X. Important Reminder: The Cost of Complexity
10.1 Learning Cost
The strategy contains 200+ optimizable parameters. Full understanding requires:
- Familiarity with basic indicators like Bollinger Bands, RSI, EMA
- Understanding of Elliott Wave Theory (EWO)
- Mastery of advanced indicators like CTI, CMF
- Knowledge of NFI series signal underlying logic
10.2 Hardware Requirements
| Number of Pairs | Minimum RAM | Recommended RAM |
|---|---|---|
| 1-10 pairs | 4GB | 8GB |
| 10-30 pairs | 8GB | 16GB |
| 30+ pairs | 16GB | 32GB |
10.3 Differences Between Backtest and Live Trading
- Strategy may perform exceptionally well in backtests
- In live trading, slippage, latency, liquidity and other factors have significant impact
- Complex parameters easily overfit historical data
10.4 Manual Trader Recommendations
If you want to apply this strategy's logic to manual trading:
- Focus on Bollinger Band lower band 2-3 standard deviation prices
- Watch for RSI below 30
- Seek pullback opportunities above EMA 200
- Set 3%-5% profit-taking targets
XI. Summary
BB_RPB_TSL_SMA_Tranz_TB_MOD is a highly complex multi-signal strategy. Its core value lies in:
- Signal Diversity: Covers multiple entry scenarios including pullback, breakout, and oscillation
- Tiered Risk Management: 12-tier profit-taking mechanism balances greed and fear
- Dynamic Stop Loss: Automatically adjusts risk exposure as profit changes
- Multiple Protections: Pump protection, slippage protection, cool-down period mechanisms
For quantitative traders, it is recommended to test thoroughly in a simulated environment before gradually applying to live trading. Remember: the more complex the strategy, the higher the overfitting risk.
Applicable to Freqtrade quantitative trading framework