Skip to main content

MACD_BB_Stoch Strategy Analysis

Strategy ID: #232 (Strategy #232 of 465)
Strategy Type: MACD + Bollinger Bands + Stochastic Triple-Indicator Combination
Timeframe: 15 Minutes (15m)


I. Strategy Overview

MACD_BB_Stoch is a triple-indicator combination strategy that combines three classic technical analysis tools: MACD (trend momentum), Bollinger Bands (volatility), and Stochastic (oscillator). The strategy name clearly indicates the three core indicators: MACD + BB (Bollinger Bands) + Stoch (Stochastic).

This triple-confirmation mechanism aims to improve signal quality and reduce false signals, but may also result in fewer trading signals. The strategy's design philosophy is "better to miss than to buy wrong," pursuing high win rate over high frequency.

Core Characteristics

CharacteristicDescription
Buy Conditions2–3 sets of triple-indicator combination buy signals
Sell Conditions1 set of base sell signals + tiered take-profit + trailing stop
ProtectionMulti-layer protection (trend filter + overbought/oversold filter + momentum confirmation)
Timeframe15-minute primary timeframe
Dependenciespandas, numpy, TA-Lib

II. Strategy Configuration Analysis

2.1 Basic Risk Parameters

# ROI Exit Table
minimal_roi = {
"0": 0.10, # Immediate exit: 10% profit
"30": 0.06, # After 30 minutes: 6% profit
"60": 0.03, # After 60 minutes: 3% profit
"120": 0 # After 120 minutes: breakeven exit
}

# Stoploss Settings
stoploss = -0.08 # -8% hard stoploss

# Trailing Stop
trailing_stop = True
trailing_stop_positive = 0.03 # 3% trailing start
trailing_stop_positive_offset = 0.035 # 3.5% offset trigger

Design Philosophy:

  • Time-Decreasing ROI: The longer the holding period, the lower the exit threshold
  • Strict Stoploss: -8% stoploss controls maximum loss per trade
  • Trailing Stop Protection: Activates protection after 3.5% profit is reached
  • Triple Confirmation: Buy only when all three indicators are satisfied, improving signal quality

2.2 Order Type Configuration

order_types = {
"entry": "limit", # Limit order entry
"exit": "limit", # Limit order exit
"stoploss": "market", # Market stoploss order
"stoploss_on_exchange": True,
}

III. Entry Conditions Details

3.1 Triple-Indicator Synergy Mechanism

The buy signals require all three indicators to simultaneously meet conditions, forming a "triple confirmation" mechanism:

IndicatorFunctionConfirmation Role
MACDTrend directionConfirms if in a trend
Bollinger BandsPrice positionConfirms if entry point is favorable
StochasticOverbought/oversoldConfirms if near a turning point

3.2 Condition #1: MACD Golden Cross + Bollinger Middle Band + Stochastic Oversold Bounce

Logic:

# MACD golden cross confirmation
macd_cross = crossed_above(dataframe['macd'], dataframe['macdsignal'])

# Price near Bollinger middle band (favorable position)
price_near_middle = dataframe['close'] > dataframe['bb_middle'] * 0.98
price_near_middle = price_near_middle & (dataframe['close'] < dataframe['bb_middle'] * 1.02)

# Stochastic bouncing from oversold
stoch_oversold = dataframe['stoch_k'] < 30
stoch_rising = dataframe['stoch_k'] > dataframe['stoch_k'].shift(1)

# Combined condition
buy_signal_1 = macd_cross & price_near_middle & stoch_oversold & stoch_rising

Core Points:

  • MACD generates golden cross (momentum strengthening)
  • Price near Bollinger middle band (favorable position, not extreme)
  • Stochastic bouncing from oversold territory (rebound signal)

3.3 Condition #2: Bollinger Lower Band + Stochastic Oversold + MACD Momentum

Logic:

# Price touching Bollinger lower band (oversold)
price_touch_lower = dataframe['close'] < dataframe['bb_lower'] * 1.01

# Stochastic in deep oversold (< 20)
stoch_deep_oversold = dataframe['stoch_k'] < 20

# MACD momentum turning positive or about to turn
macd_momentum = dataframe['macd'] > dataframe['macd'].shift(1)

# Combined condition
buy_signal_2 = price_touch_lower & stoch_deep_oversold & macd_momentum

Core Points:

  • Price touching Bollinger lower band (oversold position)
  • Stochastic in deep oversold (< 20)
  • MACD momentum starting to turn positive (downward momentum weakening)

3.4 Condition #3: Stochastic Golden Cross + MACD Above Zero + Bollinger Support

Logic:

# Stochastic golden cross
stoch_cross = crossed_above(dataframe['stoch_k'], dataframe['stoch_d'])

# MACD above zero line (bullish trend)
macd_positive = dataframe['macd'] > 0

# Price holding Bollinger middle band support
bb_support = dataframe['close'] > dataframe['bb_middle']

# Combined condition
buy_signal_3 = stoch_cross & macd_positive & bb_support

Core Points:

  • Stochastic generates golden cross (short-term rebound signal)
  • MACD above zero (confirming bullish trend)
  • Price holding Bollinger middle band (support valid)

IV. Exit Conditions Details

4.1 Tiered Take-Profit System

The strategy uses a time-decreasing exit mechanism, dynamically adjusting take-profit targets based on holding time:

Holding TimeMin Profit RateTrigger ConditionDesign Intent
0–30 minutes10%Quick profitCapture strong moves
30–60 minutes6%Medium targetAllow trend development time
60–120 minutes3%Long-term targetLower expectations
After 120 minutes0%Breakeven exitAvoid time cost

4.2 Base Sell Signals

Sell Signal #1: MACD Death Cross

# MACD death cross
macd_death_cross = crossed_below(dataframe['macd'], dataframe['macdsignal'])

Sell Signal #2: Stochastic Enters Overbought Territory

# Stochastic overbought
stoch_overbought = dataframe['stoch_k'] > 80

Sell Signal #3: Price Touches Bollinger Upper Band

# Price touches upper band
price_touch_upper = dataframe['close'] > dataframe['bb_upper'] * 0.99

4.3 Stoploss Mechanism

TypeParameterDescription
Hard Stoploss-8%Forced exit at 8% loss
Trailing Stop+3.5%Activates protection after 3.5% profit
Trailing Drawdown3%Triggers stoploss from highest point on 3% drawdown

V. Technical Indicator System

5.1 Core Indicators

Indicator CategorySpecific IndicatorParametersPurpose
Trend IndicatorMACD12/26/9Trend direction and momentum
Volatility IndicatorBollinger Bands20, 2Overbought/oversold identification
Momentum IndicatorStochastic14, 3, 3Overbought/oversold confirmation

5.2 MACD Indicator Details

Calculation Method:

  • DIF = EMA(12) - EMA(26)
  • DEA = EMA(DIF, 9)
  • MACD Histogram = (DIF - DEA) × 2

Signal Interpretation:

SignalConditionMeaning
Golden CrossDIF crosses above DEABuy signal
Death CrossDIF crosses below DEASell signal
Above ZeroDIF > 0Bullish trend
Below ZeroDIF < 0Bearish trend

5.3 Bollinger Bands Indicator Details

Calculation Method:

  • Middle Band = MA(20)
  • Upper Band = Middle Band + 2 × Standard Deviation
  • Lower Band = Middle Band - 2 × Standard Deviation

Signal Interpretation:

SignalConditionMeaning
Touching Upper BandPrice > Upper BandOverbought
Touching Lower BandPrice < Lower BandOversold
Band NarrowingUpper - Lower Band decreasingVolatility decreasing, potential breakout
Band WideningUpper - Lower Band increasingVolatility increasing, trend forming

5.4 Stochastic Indicator Details

Calculation Method:

  • %K = (Close - N-day Low) / (N-day High - N-day Low) × 100
  • %D = MA(%K, 3)

Signal Interpretation:

SignalConditionMeaning
Oversold%K < 20Price may bounce
Overbought%K > 80Price may pull back
Golden Cross%K crosses above %DBuy signal
Death Cross%K crosses below %DSell signal

VI. Risk Management Highlights

6.1 Triple-Indicator Cross-Validation

# Triple confirmation logic
def confirm_buy_signal(dataframe):
macd_confirm = check_macd_signal(dataframe)
bb_confirm = check_bb_signal(dataframe)
stoch_confirm = check_stoch_signal(dataframe)

return macd_confirm and bb_confirm and stoch_confirm

6.2 Position Management Recommendations

CapitalRecommended Max PositionsPer-Trade Position
Below 1000 USDT2–330–50%
1000–5000 USDT3–520–30%
Above 5000 USDT5–810–20%

6.3 Stoploss Settings Recommendations

Market VolatilityRecommended StoplossDescription
Low Volatility-6%Small moves, can tighten stoploss
Medium Volatility-8%Default setting
High Volatility-10%Large moves, can widen stoploss

VII. Strategy Pros & Cons

Pros

  1. Triple Confirmation: All three indicators must agree, high signal quality, fewer false signals
  2. Multi-Dimensional Analysis: Trend (MACD), Position (Bollinger Bands), Momentum (Stochastic) fully covered
  3. Classic and Reliable: All three are decades-old classic indicators
  4. Broad Applicability: Usable across multiple markets and trading pairs
  5. Clear Logic: Each indicator's role is explicit, easy to understand and optimize

Cons

  1. Sparse Signals: All three conditions being satisfied simultaneously is rare, low trading frequency
  2. More Lag: All three indicators have some lag, may miss optimal entry points
  3. Complex Parameters: Need to tune three indicators simultaneously, high optimization difficulty
  4. Average Performance in Trending Markets: Triple confirmation may miss entry opportunities in strong trends
  5. Ineffective in Extreme Consolidation: All three indicators may fail in extreme sideways markets

VIII. Applicable Scenarios

Market EnvironmentRecommended ConfigDescription
Ranging MarketFocus on itStochastic overbought/oversold signals effective
UptrendUse cautiouslyTriple confirmation may miss quick moves
DowntrendReduce tradesSame as above
Sideways ConsolidationGood for itMany range-trading opportunities
High VolatilityAdjust stoplossMay need to widen stoploss

IX. Applicable Market Environment Details

MACD_BB_Stoch is a triple-indicator combination strategy suitable for finding rebound opportunities in ranging markets. Its core design philosophy is "multi-confirmation, quality over quantity."

9.1 Strategy Core Logic

  • MACD: Confirms trend direction and momentum strength
  • Bollinger Bands: Confirms if price position is in a favorable zone
  • Stochastic: Confirms overbought/oversold status
  • Triple Confirmation: Improves signal reliability, reduces false breakouts

9.2 Performance Across Market Environments

Market TypePerformance RatingAnalysis
Uptrend★★★☆☆Triple confirmation may miss best entry points, but can capture opportunities on pullbacks
Downtrend★★★☆☆Same as above, may miss shorting opportunities
Wide Range★★★★☆Stochastic overbought/oversold signals effective, Bollinger Bands provides boundaries
Extreme Consolidation★★★★☆Many range opportunities, all three indicators suit ranging analysis

9.3 Key Configuration Recommendations

Config ItemRecommended ValueDescription
Trading PairsMedium-volatility tokensAvoid extreme volatility or extreme calm
Timeframe15m (default)Adjustable based on token characteristics
Stoploss-8% (default)Adjust based on volatility
Trailing StopEnableProtect profits

X. Summary

MACD_BB_Stoch is a classic triple-indicator combination strategy. Its core value lies in:

  1. Triple Confirmation Mechanism: MACD + Bollinger Bands + Stochastic triple verification, improving signal quality
  2. Multi-Dimensional Analysis: Trend, position, momentum three dimensions fully covered
  3. Classic and Reliable: All three indicators are time-tested classic tools
  4. Good for Ranging Markets: Performs well in range-bound oscillations

Recommendations for quantitative traders:

  • Use primarily in ranging markets
  • Adjust parameters based on token volatility
  • Maintain patience, wait for high-quality signals
  • Maintain strict risk management