BB_RPB_TSL_RNG_TBS_GOLD Strategy Analysis
Strategy Number: #33
Strategy Type: Multi-Condition Trend Following + Bollinger Bands Protection + Dynamic Trailing Stop
Timeframe: 5 minutes (5m)
I. Strategy Overview
BB_RPB_TSL_RNG_TBS_GOLD is a highly complex professional-grade trading strategy. Each abbreviation in its name represents an important technical component: BB (Bollinger Bands), RPB (Real Pull Back), TSL (Trailing Stop Loss), RNG (Range), TBS (To Be Determined), GOLD (Golden Level Optimization).
This strategy was developed by Freqtrade community user jilv220, inspired by the combined optimization of multiple well-known strategies. The strategy integrates Bollinger Band regression strategies, RMI momentum indicators, CCI trend-following indicators, EWO wave indicators, and various other technical analysis tools, while implementing a complex multi-layer trailing stop system.
Core Features
| Feature | Description |
|---|---|
| Entry Conditions | 7 independent entry signals, can be enabled/disabled independently |
| Exit Conditions | 1 base exit condition + multi-layer trailing stop |
| Protection | 3 main protection parameter groups (BTC protection, dynamic take-profit, trend filtering) |
| Timeframe | Main timeframe 5 minutes + informative timeframe 1 hour |
| Dependencies | talib, technical, pandas_ta, numpy |
II. Strategy Configuration Analysis
2.1 Base Risk Parameters
# ROI exit table
minimal_roi = {
"0": 0.10, # Immediate exit requires 10% profit
}
# Stoploss setting
stoploss = -0.049 # 4.9% fixed stoploss
Design Logic:
This strategy adopts a minimalist ROI table design, setting only a 10% take-profit threshold at time 0. This indicates that the strategy's design focus is not on time-based gradient take-profit, but rather on managing profits through trailing stops and exit conditions.
The 4.9% fixed stoploss is a relatively balanced setting, tolerating normal price fluctuations while effectively protecting capital safety when trends reverse.
2.2 Complex Trailing Stop System
# Trailing stop parameters
pHSL = DecimalParameter(-0.200, -0.040, default=-0.08, decimals=3)
pPF_1 = DecimalParameter(0.008, 0.020, default=0.016, decimals=3)
pSL_1 = DecimalParameter(0.008, 0.020, default=0.011, decimals=3)
pPF_2 = DecimalParameter(0.040, 0.100, default=0.080, decimals=3)
pSL_2 = DecimalParameter(0.020, 0.070, default=0.040, decimals=3)
Dynamic Take-Profit Mechanism Explained:
This strategy implements a complex hierarchical trailing stop system:
| Profit Range | Stoploss Trigger Point | Design Intent |
|---|---|---|
| < 1.6% | Use hard stoploss -8% | Protect principal, avoid small gains turning into big losses |
| 1.6% - 8% | Linearly adjust between 1.1% - 4% | Lock in partial profits |
| > 8% | Allow retracement to 4% before exit | Let profits run |
2.3 Order Type Configuration
order_types = {
"entry": "limit",
"exit": "limit",
"stoploss": "limit",
"stoploss_on_exchange": False,
}
The strategy uses limit orders for trading and does not enable exchange-native stoploss functionality.
III. Entry Conditions Details
3.1 Seven Entry Conditions Classification
This strategy implements 7 independent entry conditions, each targeting specific market states:
| Condition Group | Condition Number | Core Logic | Enabled Status |
|---|---|---|---|
| Bollinger Band Bounce | BB Checked | Bounce after price touches lower Bollinger Band | Enabled |
| Local Uptrend | local uptrend | EMA moving averages bullish alignment + price contraction | Enabled |
| EWO Wave | EWO | Momentum indicator oversold bounce | Enabled |
| EWO Wave 2 | EWO2 | Enhanced EWO signal | Enabled |
| Bollinger Band + Stochastic | CoFi | Bollinger Band narrow rail + KDJ golden cross | Enabled |
| NFI Fast Mode | NFI 32 | RSI divergence + price oversold | Enabled |
| NFI Fast Mode | NFI 33 | Extreme oversold + volume surge | Enabled |
3.2 Condition Details
Condition 1: Bollinger Band Bounce (BB Checked)
is_BB_checked = is_dip & is_break
is_dip = (
(dataframe[f'rmi_length_{self.buy_rmi_length.value}'] < self.buy_rmi.value) &
(dataframe[f'cci_length_{self.buy_cci_length.value}'] <= self.buy_cci.value) &
(dataframe['srsi_fk'] < self.buy_srsi_fk.value)
)
is_break = (
(dataframe['bb_delta'] > self.buy_bb_delta.value) &
(dataframe['bb_width'] > self.buy_bb_width.value)
)
Technical Meaning: When Bollinger Band width and delta simultaneously meet conditions, it represents price at the critical point of breakout after contraction.
Conditions 2-7: Various Trend Conditions
| Condition | Core Indicator | Trigger Threshold Example |
|---|---|---|
| local uptrend | EMA difference | > 0.022 |
| EWO | Wave indicator | > 4.179 |
| EWO2 | Wave indicator | > 8.0 |
| CoFi | Stochastic + ADX | fastk < 22, adx > 20 |
| NFI 32 | RSI divergence | rsi_slow < rsi_slow.shift(1), rsi_fast < 46 |
| NFI 33 | Extreme oversold | EWO > 8, cti < -0.88 |
IV. Exit Logic Details
4.1 Trailing Stop System
This strategy implements multi-level trailing stops, which is its core profit protection mechanism:
Profit Range Stoploss Trigger Point
──────────────────────────────────────────
< 1.6% Hard stoploss -8%
1.6% - 8% Linear interpolation 1.1% - 4%
> 8% Dynamic exit point (current profit - 4%)
4.2 Base Exit Conditions
conditions.append(
(
(dataframe['close'] > dataframe['sma_9'])&
(dataframe['close'] > (dataframe[f'ma_sell_{self.base_nb_candles_sell.value}'] * self.high_offset_2.value)) &
(dataframe['rsi']>50)&
(dataframe['volume'] > 0)&
(dataframe['rsi_fast'] > dataframe['rsi_slow'])
)
|
(
(dataframe['sma_9'] > (dataframe['sma_9'].shift(1) + dataframe['sma_9'].shift(1)*0.005 )) &
(dataframe['close'] < dataframe['hma_50'])&
(dataframe['close'] > (dataframe[f'ma_sell_{self.base_nb_candles_sell.value}'] * self.high_offset.value)) &
(dataframe['volume'] > 0)&
(dataframe['rsi_fast']>dataframe['rsi_slow'])
)
)
Exit Conditions Interpretation:
- Condition 1: Price breaks above short-term moving average, RSI in bullish state
- Condition 2: Moving average starts declining, but price still above moving average
V. Technical Indicator System
5.1 Core Indicators
| Indicator Category | Specific Indicator | Purpose |
|---|---|---|
| Trend Indicators | EMA(8,12,13,16,26,100) | Multi-period trend judgment |
| Trend Indicators | SMA(9,15,30) | Support/resistance identification |
| Trend Indicators | HMA(50) | Fast trend confirmation |
| Bollinger Bands | BB(20,2), BB(20,3) | Volatility measurement |
| Momentum Indicators | RSI(4,14,20) | Overbought/oversold judgment |
| Momentum Indicators | RMI(8-20) | Improved RSI |
| Momentum Indicators | CCI(25,170) | Commodity Channel Index |
| Momentum Indicators | EWO | Wave momentum |
| Stochastic | StochRSI | Overbought/oversold |
| Volume | Volume Mean | Volume validation |
| BTC Protection | BTC 5m/1d | Market trend filtering |
5.2 BTC Protection Mechanism
# BTC 5m sharp drop protection
informative_past_delta = informative_past['close'].shift(1) - informative_past['close']
informative_diff = informative_threshold - informative_past_delta
# BTC 1d trend protection
dataframe['btc_1d'] = informative_past_1d_source
The strategy filters counter-trend trading signals by monitoring BTC's short-term and long-term trends.
VI. Risk Management Features
6.1 Multi-Layer Stoploss Protection
| Protection Layer | Trigger Condition | Action |
|---|---|---|
| Hard Stoploss | Loss 4.9% | Close all positions |
| Soft Stoploss | Profit > 1.6% | Enable trailing stop |
| Trailing Stop | Profit retraces to threshold | Partial or full close |
6.2 Condition-Level Protection
Each entry condition can be independently enabled/disabled:
buy_is_dip_enabled = CategoricalParameter([True, False], default=True)
buy_is_break_enabled = CategoricalParameter([True, False], default=True)
6.3 Volume Protection
dataframe['volume_mean_4'] = dataframe['volume'].rolling(4).mean().shift(1)
# Used in NFI33 condition
(dataframe['volume'] < (dataframe['volume_mean_4'] * 2.5))
VII. Strategy Pros & Cons
✅ Pros
- Multi-Condition Combination: 7 independent conditions covering various market patterns
- Dynamic Trailing Stop: Complex take-profit system balancing risk and reward
- BTC Protection: Filters counter-trend trades during market declines
- Independently Configurable Conditions: Each condition can be enabled/disabled separately
- Professional-Grade Indicator Combination: Integrates RMI, CCI, EWO and other advanced indicators
- Community Verified: Long-term live trading verification by Freqtrade community
⚠️ Cons
- Numerous Parameters: 50+ hyperparameters, difficult to optimize
- High Computational Load: Demands high hardware resources
- Easy to Overfit: Historical data may produce false optimization
- High Complexity: High debugging and maintenance costs
- Large Memory Footprint: Multi-indicator calculation causes memory pressure
VIII. Applicable Scenarios
| Market Environment | Recommended Configuration | Description |
|---|---|---|
| Clear bullish market | Enable most conditions | High signal quality |
| Ranging market | Reduce number of pairs | Lower false signals |
| High volatility coins | Tighten stoploss | Control risk |
| Mainstream coins | Can increase pair count | Good liquidity |
IX. Detailed Applicable Market Environments
9.1 Strategy Core Logic
BB_RPB_TSL_RNG_TBS_GOLD is a typical "multi-condition confirmation" strategy. It doesn't rely on a single indicator, but requires multiple conditions to be met simultaneously before triggering entry. This design significantly reduces the probability of false signals, but also increases requirements for market adaptability.
9.2 Performance in Different Market Environments
| Market Type | Performance Rating | Reason Analysis |
|---|---|---|
| 📈 Uptrend | ⭐⭐⭐⭐⭐ | Multi-condition resonance, best effect when trend continues |
| 📉 Downtrend | ⭐⭐ | BTC protection filters some signals, but may still go counter-trend |
| 🔄 Ranging market | ⭐⭐⭐ | Bollinger Band conditions effective in ranging markets |
| ⚡ High volatility | ⭐⭐⭐⭐ | Large volatility brings large profits |
9.3 Key Configuration Recommendations
| Configuration Item | Suggested Value | Description |
|---|---|---|
| Number of pairs | 10-20 | Risk diversification |
| Memory requirement | 4GB+ | Complex calculations needed |
| Timeframe | Keep 5m | Strategy specifically designed for this |
X. Important Reminders: The Cost of Complexity
10.1 Learning Cost
This strategy has numerous parameters requiring deep understanding of each indicator's function:
- 7 entry conditions need individual understanding
- Trailing stop system requires mathematical foundation
- BTC protection mechanism requires technical analysis knowledge
- Suggested learning time: 2-4 weeks
10.2 Hardware Requirements
| Number of Pairs | Minimum Memory | Recommended Memory |
|---|---|---|
| 1-10 | 2GB | 4GB |
| 10-30 | 4GB | 8GB |
| 30+ | 8GB | 16GB |
10.3 Backtest vs Live Trading Differences
- Hyperparameters may overfit historical data
- Complex conditions may perform inconsistently in live trading
- Walk-forward optimization method recommended
10.4 Manual Trader Suggestions
When executing manually:
- Understand the trigger logic of each condition
- Prioritize main conditions (such as BB Checked)
- Set reasonable position management
XI. Summary
BB_RPB_TSL_RNG_TBS_GOLD is a professional-grade complex strategy suitable for experienced quantitative traders. Its multi-condition confirmation mechanism and dynamic trailing stop system constitute a complete trading system.
Its core values are:
- Systematic: Complete entry-exit-risk control system
- Flexible: Conditions can be independently configured
- Professional: Integrates multiple advanced technical indicators
- Community Support: Long-term verified
For quantitative traders, this strategy requires significant learning and testing time, but in return, it provides a verified configurable trading system. It's recommended to start with default parameters and optimize gradually.
Document Version: v1.0
Strategy Series: Multi-Condition Trend Following