Skip to main content

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

ParameterValueDescription
timeframe5m5-minute candles, suitable for short-term trading
minimal_roi{"0": 0.018}Take-profit triggers when cumulative return reaches 1.8%
stoploss-0.10Stop-loss set at -10%
use_exit_signalTrueEnable exit signal judgment
exit_profit_onlyTrueOnly trigger sell signals in profitable state
exit_profit_offset0.001Only allow selling after profit exceeds 0.1%
ignore_roi_if_entry_signalTrueIgnore ROI limit when entry signal appears

2.2 Trailing Stop Configuration

ParameterValueDescription
trailing_stopTrueEnable trailing stop
trailing_only_offset_is_reachedTrueOnly activate trailing after profit reaches offset
trailing_stop_positive0.01Trailing stop distance 1%
trailing_stop_positive_offset0.03Activate 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:

ConditionMeaning
lower.shift() > 0Confirm the lower Bollinger Band is valid (exclude calculation errors)
bbdelta > close * 0.008Bollinger Band channel width is at least 0.8% of current price, ensuring sufficient volatility
closedelta > close * 0.0175Closing price differs from previous close by more than 1.75%, reflecting intraday volatility intensity
tail < bbdelta * 0.25Lower 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:

ConditionMeaning
close < ema_slowPrice is below the 50-day EMA, confirming a medium-term downtrend
close < 0.985 * bb_lowerbandPrice is below 98.5% of the Bollinger Band lower rail, clearly breaking below the band
volume < volume_mean_slow.shift(1) * 20Today'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 = True ensures selling only in profitable state
  • exit_profit_offset = 0.001 requires 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:

ConditionMeaning
close > bb_upperbandClose breaks above the Bollinger Band upper rail
4 consecutive candles above upper railConfirm breakout persistence, exclude momentary false breakouts
volume > 0Exclude 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

IndicatorCalculationPurpose
mid / lowerCustom Bollinger Bands (40, 2)Core indicator for BinHV45 strategy
bbdelta|mid - lower|Bollinger Band channel width
bb_lowerbandqtpylib.bollinger_bands (20, 2)Bollinger Band used by Cluc strategy
bb_middlebandBollinger Band middle railTrend reference
bb_upperbandBollinger Band upper railSell signal trigger

5.2 Moving Average Indicators

IndicatorPeriodPurpose
ema_slow50Judge medium-term trend direction
ema_200200Long-term trend reference (not actually used in code)

5.3 Volatility Indicators

IndicatorFormulaMeaning
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

IndicatorPeriodPurpose
volume_mean_slow30Volume moving average, used for volume-shrinking filter

VI. Risk Management Features

6.1 Multi-Layer Risk Control System

  1. Fixed Stop-Loss: -10% hard stop
  2. Time Stop-Loss: If still in loss after 36.7 hours, force exit at market price
  3. Trailing Stop: Activate 1% trailing when profit exceeds 3%
  4. Take-Profit Threshold: 1.8% cumulative return triggers automatic take-profit

6.2 Take-Profit Restrictions

  • exit_profit_only = True prevents passive selling in a loss state
  • exit_profit_offset = 0.001 ensures 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

  1. Dual-Factor Complementarity: BinHV45 captures rapid sell-off rebounds, ClucMay72018 captures volume-shrinking oversold rebounds, with broader adaptability
  2. Low-Frequency Stop-Loss Design: Custom stop-loss handles long floating losses, reducing extreme market liquidation risk
  3. Trailing Protection: 3% profit activates trailing stop, locking in partial gains
  4. Clear Signals: Entry conditions are specific and quantifiable, with high backtesting reliability

7.2 Cons

  1. 5-Minute Period Noise: High-frequency trading is susceptible to short-term fluctuations, generating frequent trading costs
  2. Low Take-Profit: 1.8% target may be too conservative in sideways markets, missing major trend opportunities
  3. Volatility-Dependent: Strategy is inherently mean reversion and performs poorly in one-directional trending markets
  4. Strict Exit Conditions: Must have 5 consecutive candles breaking the upper rail before selling, possibly missing the best exit point

VIII. Applicable 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
  • 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 CharacteristicStrategy Performance
Wide-Range Sideways⭐⭐⭐⭐⭐
High Volatility⭐⭐⭐⭐
Rapid Sell-off Then Rebound⭐⭐⭐⭐⭐

9.2 Average-Performing Markets

Market CharacteristicStrategy 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

  1. Backtesting Verification: Complete at least 3 months of backtesting on target trading pairs before live trading
  2. Fee Impact: 5-minute period trading is frequent, and fees significantly erode returns—choose low-fee platforms
  3. Parameter Tuning: minimal_roi and stoploss can be adjusted based on trading pair characteristics
  4. Liquidity Risk: Small-cap tokens may have slippage risks due to insufficient liquidity
  5. 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