Skip to main content

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

FeatureDescription
Buy Conditions40+ independent buy signals covering pullback, breakout, oscillation, and other scenarios
Sell Conditions12-tier graduated profit-taking + multi-scenario dynamic exits
Protection Mechanisms2 protection parameter sets (cool-down period, low-profit pair protection)
TimeframesMain timeframe 5m, informative timeframes 1h + 15m
Dependenciespandas_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 GroupNumber of ConditionsCore Logic
Bollinger Band Pullback5Price touches BB lower band, suitable for oversold bounce
Trend Pullback8Seek pullback buy opportunities in uptrend
Oscillation Breakout6BB width contraction followed by breakout, capturing volatility changes
NFI Series Signals20+Deep pullback signals from NFI strategy
Momentum Reversal5CTI, 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

ScenarioTrigger ConditionSignal Name
Below EMA200 ProfitPrice < EMA200 and profit target metsignal_profit_u_*
Pump Then Pullback48h gain exceeds thresholdsignal_profit_p_*
SMA DowntrendSMA200 continuously decliningsignal_profit_d_*
Trailing StopPrice pullback from highest pointsignal_profit_t_*
Long-term Hold Stop LossPosition held too long while at losssignal_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 CategorySpecific IndicatorsUsage
Trend IndicatorsEMA (4, 8, 12, 13, 16, 20, 26, 50, 100, 200)Trend direction judgment
Trend IndicatorsSMA (9, 15, 20, 21, 28, 30, 75, 200)Support/resistance levels
Oscillator IndicatorsRSI (4, 14, 20), StochRSIOverbought/oversold judgment
Volatility IndicatorsBollinger Bands (20, 2), (20, 3), (40, 2)Volatility channels
Momentum IndicatorsCCI, CMO, CTI, Williams %RMomentum extremes
Volume IndicatorsCMF, MFI, Volume MeanVolume-price analysis
Composite IndicatorsEWO (Elliott Wave Oscillator), PMAXTrend 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

  1. Rich Signals: 40+ buy conditions cover multiple market scenarios, improving signal capture rate
  2. Comprehensive Risk Control: 12-tier graduated profit-taking + dynamic stop loss + protection mechanisms
  3. Multi-timeframe Confirmation: Uses 1h and 15m timeframes to filter false signals
  4. Prevents Chasing Highs: Pump protection mechanism avoids buying at peaks
  5. Slippage Protection: Entry confirmation mechanism prevents excessive slippage

⚠️ Limitations

  1. Numerous Parameters: Over 200 optimizable parameters, prone to overfitting
  2. Computationally Intensive: Multi-timeframe and multi-indicator calculations demand high hardware requirements
  3. Backtest Traps: Complex strategies may perform excellently in backtests but poorly in live trading
  4. Steep Learning Curve: Understanding all signals requires significant time investment

VIII. Applicable Scenario Recommendations

Market EnvironmentRecommended ConfigurationDescription
Slow Bull TrendDefault configurationTrend pullback signals perform excellently
Wide OscillationEnable more pullback signalsBollinger Band pullback signals work well
Post-Crash ReboundEnable NFI seriesDeep pullback signals capture rebounds
Rapid RiseUse with cautionPump protection may limit entries
Sideways ConsolidationReduce trading frequencyFalse 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 TypePerformance RatingReason 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 ItemRecommended ValueDescription
Stop Loss-0.15As final safety net
Minimum ROI0.005Minimum profit target
Cool-down Period2 candlesPrevents 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 PairsMinimum RAMRecommended RAM
1-10 pairs4GB8GB
10-30 pairs8GB16GB
30+ pairs16GB32GB

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:

  1. Focus on Bollinger Band lower band 2-3 standard deviation prices
  2. Watch for RSI below 30
  3. Seek pullback opportunities above EMA 200
  4. 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:

  1. Signal Diversity: Covers multiple entry scenarios including pullback, breakout, and oscillation
  2. Tiered Risk Management: 12-tier profit-taking mechanism balances greed and fear
  3. Dynamic Stop Loss: Automatically adjusts risk exposure as profit changes
  4. 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