CombinedBinHAndClucV3 Strategy Analysis
I. Strategy Overview
CombinedBinHAndClucV3 is a multi-factor mean reversion trading strategy that combines the signal logic of two classic strategies—BinHV45 and ClucMay72018—to capture oversold rebound opportunities in sideways markets.
The core idea is: when price deviates from the lower Bollinger Band due to short-term volatility and shows a clear contracting pattern, it is identified as a potential mean reversion signal. At the same time, volume filtering and EMA trend judgment are used to reduce the probability of false breakouts.
The strategy runs on a 5-minute short-term timeframe by default, emphasizing fast entry and exit. Annualized expected returns depend on market volatility and are suitable for traders with a certain level of risk tolerance.
II. Strategy Configuration Analysis
2.1 Basic Parameters
| Parameter | Value | Description |
|---|---|---|
timeframe | 5m | 5-minute candles, suitable for short-term trading |
minimal_roi | {"0": 0.018} | Take-profit triggers when cumulative return reaches 1.8% |
stoploss | -0.10 | Stop-loss set at -10% |
use_exit_signal | True | Enable exit signal judgment |
exit_profit_only | True | Only trigger sell signals in profitable state |
exit_profit_offset | 0.001 | Only allow selling after profit exceeds 0.1% |
ignore_roi_if_entry_signal | True | Ignore ROI limit when entry signal appears |
2.2 Trailing Stop Configuration
| Parameter | Value | Description |
|---|---|---|
trailing_stop | True | Enable trailing stop |
trailing_only_offset_is_reached | True | Only activate trailing after profit reaches offset |
trailing_stop_positive | 0.01 | Trailing stop distance 1% |
trailing_stop_positive_offset | 0.03 | Activate trailing when profit reaches 3% |
2.3 Order Types
order_types = {
'entry': 'limit', # Limit order entry
'exit': 'limit', # Limit order exit
'stoploss': 'market' # Stop-loss uses market order
}
III. Entry Conditions Details
The strategy's buy signals are generated by two independent conditions; meeting either one triggers a buy:
3.1 Condition One: BinHV45 Strategy
(dataframe['lower'].shift().gt(0) &
dataframe['bbdelta'].gt(dataframe['close'] * 0.008) &
dataframe['closedelta'].gt(dataframe['close'] * 0.0175) &
dataframe['tail'].lt(dataframe['bbdelta'] * 0.25) &
dataframe['close'].lt(dataframe['lower'].shift()) &
dataframe['close'].le(dataframe['close'].shift()))
Signal Interpretation:
| Condition | Meaning |
|---|---|
lower.shift() > 0 | Confirm the lower Bollinger Band is valid (exclude calculation errors) |
bbdelta > close * 0.008 | Bollinger Band channel width is at least 0.8% of current price, ensuring sufficient volatility |
closedelta > close * 0.0175 | Closing price differs from previous close by more than 1.75%, reflecting intraday volatility intensity |
tail < bbdelta * 0.25 | Lower wick length is less than 25% of channel width, meaning close is near the day's low |
close < lower.shift() | Close breaks below the previous day's lower Bollinger Band, forming a "piercing" behavior |
close <= close.shift() | Close is not higher than the previous day's close, confirming a rebound attempt within a downtrend |
Combined Logic: Price drops rapidly and pierces the lower Bollinger Band, with sufficient volatility and a short lower wick—this is a typical oversold rebound pattern.
3.2 Condition Two: ClucMay72018 Strategy
((dataframe['close'] < dataframe['ema_slow']) &
(dataframe['close'] < 0.985 * dataframe['bb_lowerband']) &
(dataframe['volume'] < (dataframe['volume_mean_slow'].shift(1) * 20)))
Signal Interpretation:
| Condition | Meaning |
|---|---|
close < ema_slow | Price is below the 50-day EMA, confirming a medium-term downtrend |
close < 0.985 * bb_lowerband | Price is below 98.5% of the Bollinger Band lower rail, clearly breaking below the band |
volume < volume_mean_slow.shift(1) * 20 | Today's volume is less than 20 times the 30-day average (i.e., abnormally low volume) |
Combined Logic: During a downtrend, price rapidly breaks below the lower Bollinger Band, but volume does not expand—this suggests downward momentum is insufficient and a corrective rebound may be coming.
3.3 Entry Signal Trigger Rules
The two conditions have an OR relationship—meeting either one generates a buy signal. This design enhances the strategy's adaptability, allowing it to capture both rapid sell-off rebounds (BinHV45) and volume-shrinking oversold rebounds (ClucMay72018).
IV. Exit Conditions Details
4.1 Take-Profit Logic
The strategy uses a ROI (Return On Investment) mechanism:
- Take-profit triggers when cumulative return reaches 1.8%
exit_profit_only = Trueensures selling only in profitable stateexit_profit_offset = 0.001requires profit to exceed 0.1% before actually triggering a sell
4.2 Trailing Stop Logic
When open profit reaches 3% (trailing_stop_positive_offset), the trailing stop activates:
- Stop-loss line moves up, locking in at least 1% (
trailing_stop_positive) of profit - If price continues to rise, the stop-loss line follows
- If price drops back to touch the trailing stop line, close at market price
4.3 Exit Signal Conditions
(dataframe['close'] > dataframe['bb_upperband']) &
(dataframe['close'].shift(1) > dataframe['bb_upperband'].shift(1)) &
(dataframe['high'].shift(2) > dataframe['bb_upperband'].shift(2)) &
(dataframe['high'].shift(3) > dataframe['bb_upperband'].shift(3)) &
(dataframe['high'].shift(4) > dataframe['bb_upperband'].shift(4)) &
(dataframe['volume'] > 0)
Signal Interpretation:
| Condition | Meaning |
|---|---|
close > bb_upperband | Close breaks above the Bollinger Band upper rail |
| 4 consecutive candles above upper rail | Confirm breakout persistence, exclude momentary false breakouts |
volume > 0 | Exclude abnormal volume conditions |
Combined Logic: When price stays above the Bollinger Band upper rail for 4 consecutive 5-minute candles, it is treated as a trend weakening or overbought signal, triggering a sell.
4.4 Custom Stop-Loss Logic
def custom_stoploss(self, pair, trade, current_time, current_rate, current_profit, **kwargs):
if (current_time - timedelta(minutes=2200) > trade.open_date_utc) & (current_profit < 0):
return 0.01
return 0.5
Special Handling:
- If position is held for more than 2200 minutes (~36.7 hours) and is still in loss
- Set stop-loss parameter to 0.01 (actual market price stop)
- Purpose: prevent floating losses from further expanding in long positions
V. Technical Indicator System
5.1 Bollinger Band Indicators
| Indicator | Calculation | Purpose |
|---|---|---|
mid / lower | Custom Bollinger Bands (40, 2) | Core indicator for BinHV45 strategy |
bbdelta | |mid - lower| | Bollinger Band channel width |
bb_lowerband | qtpylib.bollinger_bands (20, 2) | Bollinger Band used by Cluc strategy |
bb_middleband | Bollinger Band middle rail | Trend reference |
bb_upperband | Bollinger Band upper rail | Sell signal trigger |
5.2 Moving Average Indicators
| Indicator | Period | Purpose |
|---|---|---|
ema_slow | 50 | Judge medium-term trend direction |
ema_200 | 200 | Long-term trend reference (not actually used in code) |
5.3 Volatility Indicators
| Indicator | Formula | Meaning |
|---|---|---|
closedelta | |close - close.shift(1)| | Intraday closing price volatility |
tail | |close - low| | Lower wick length, reflecting the degree of bounce from the day's low |
5.4 Volume Indicators
| Indicator | Period | Purpose |
|---|---|---|
volume_mean_slow | 30 | Volume moving average, used for volume-shrinking filter |
VI. Risk Management Features
6.1 Multi-Layer Risk Control System
- Fixed Stop-Loss: -10% hard stop
- Time Stop-Loss: If still in loss after 36.7 hours, force exit at market price
- Trailing Stop: Activate 1% trailing when profit exceeds 3%
- Take-Profit Threshold: 1.8% cumulative return triggers automatic take-profit
6.2 Take-Profit Restrictions
exit_profit_only = Trueprevents passive selling in a loss stateexit_profit_offset = 0.001ensures sufficient safety margin before exiting
6.3 Volume Filtering
ClucMay72018 condition requires volume < volume_mean_slow * 20, effectively filtering false signals caused by abnormal volume expansion.
VII. Strategy Pros & Cons
7.1 Pros
- Dual-Factor Complementarity: BinHV45 captures rapid sell-off rebounds, ClucMay72018 captures volume-shrinking oversold rebounds, with broader adaptability
- Low-Frequency Stop-Loss Design: Custom stop-loss handles long floating losses, reducing extreme market liquidation risk
- Trailing Protection: 3% profit activates trailing stop, locking in partial gains
- Clear Signals: Entry conditions are specific and quantifiable, with high backtesting reliability
7.2 Cons
- 5-Minute Period Noise: High-frequency trading is susceptible to short-term fluctuations, generating frequent trading costs
- Low Take-Profit: 1.8% target may be too conservative in sideways markets, missing major trend opportunities
- Volatility-Dependent: Strategy is inherently mean reversion and performs poorly in one-directional trending markets
- Strict Exit Conditions: Must have 5 consecutive candles breaking the upper rail before selling, possibly missing the best exit point
VIII. Applicable Scenarios
8.1 Recommended Scenarios
- Sideways Markets: Price fluctuates around Bollinger Band rails; strategy effectively captures rebounds
- High-Volatility Pairs: Trading instruments with high volatility more easily trigger entry conditions
- Short-Term Traders: Suitable for traders who can accept high trading frequency and fees
8.2 Not Recommended Scenarios
- One-Directional Uptrend: Strategy may sell too early, missing the main wave
- One-Directional Downtrend: Consecutive stop-loss triggers, accumulating losses
- Low-Volatility Markets: Entry conditions are hard to meet when volatility is insufficient
- Long-Term Investment: 5-minute timeframe is not suitable for long-term holding
IX. Applicable Market Environment Details
9.1 Best Market Environment
| Market Characteristic | Strategy Performance |
|---|---|
| Wide-Range Sideways | ⭐⭐⭐⭐⭐ |
| High Volatility | ⭐⭐⭐⭐ |
| Rapid Sell-off Then Rebound | ⭐⭐⭐⭐⭐ |
9.2 Average-Performing Markets
| Market Characteristic | Strategy Performance |
|---|---|
| Sustained Uptrend (Bull) | ⭐⭐ |
| Sustained Downtrend (Bear) | ⭐ |
| Low-Volatility Consolidation | ⭐⭐ |
9.3 Risk Warning
In one-directional trending markets, the strategy's entry conditions may fail to trigger continuously (no oversold signal), and once a position is taken, a trend reversal could trigger the 10% stop-loss consecutively. It is recommended to use a trend filter (such as EMA200 direction judgment) in combination.
X. Important Reminders
- Backtesting Verification: Complete at least 3 months of backtesting on target trading pairs before live trading
- Fee Impact: 5-minute period trading is frequent, and fees significantly erode returns—choose low-fee platforms
- Parameter Tuning:
minimal_roiandstoplosscan be adjusted based on trading pair characteristics - Liquidity Risk: Small-cap tokens may have slippage risks due to insufficient liquidity
- Extreme Markets: During extreme volatility periods (March 2020, May 2022), the strategy may experience significant drawdowns
XI. Summary
CombinedBinHAndClucV3 is a hybrid mean reversion strategy that combines BinHV45 and ClucMay72018 to achieve diversified capture of oversold rebound opportunities. Its design emphasizes risk control, equipped with fixed stop-loss, time stop-loss, trailing stop, and take-profit mechanisms.
This strategy performs best in high-volatility sideways markets and is suitable for short-term traders. However, it has certain requirements for market conditions and performs limitedly in one-directional trends. Traders should selectively use or combine it with other strategies based on their risk tolerance and market judgment.
Key Takeaways:
- ✅ Suitable for sideways markets and oversold rebound scenarios
- ✅ Multi-layer risk control, good safety
- ⚠️ High-frequency trading requires close attention to costs
- ⚠️ Poor performance in one-directional trending markets