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
| Characteristic | Description |
|---|---|
| Buy Conditions | 2–3 sets of triple-indicator combination buy signals |
| Sell Conditions | 1 set of base sell signals + tiered take-profit + trailing stop |
| Protection | Multi-layer protection (trend filter + overbought/oversold filter + momentum confirmation) |
| Timeframe | 15-minute primary timeframe |
| Dependencies | pandas, 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:
| Indicator | Function | Confirmation Role |
|---|---|---|
| MACD | Trend direction | Confirms if in a trend |
| Bollinger Bands | Price position | Confirms if entry point is favorable |
| Stochastic | Overbought/oversold | Confirms 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 Time | Min Profit Rate | Trigger Condition | Design Intent |
|---|---|---|---|
| 0–30 minutes | 10% | Quick profit | Capture strong moves |
| 30–60 minutes | 6% | Medium target | Allow trend development time |
| 60–120 minutes | 3% | Long-term target | Lower expectations |
| After 120 minutes | 0% | Breakeven exit | Avoid 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
| Type | Parameter | Description |
|---|---|---|
| Hard Stoploss | -8% | Forced exit at 8% loss |
| Trailing Stop | +3.5% | Activates protection after 3.5% profit |
| Trailing Drawdown | 3% | Triggers stoploss from highest point on 3% drawdown |
V. Technical Indicator System
5.1 Core Indicators
| Indicator Category | Specific Indicator | Parameters | Purpose |
|---|---|---|---|
| Trend Indicator | MACD | 12/26/9 | Trend direction and momentum |
| Volatility Indicator | Bollinger Bands | 20, 2 | Overbought/oversold identification |
| Momentum Indicator | Stochastic | 14, 3, 3 | Overbought/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:
| Signal | Condition | Meaning |
|---|---|---|
| Golden Cross | DIF crosses above DEA | Buy signal |
| Death Cross | DIF crosses below DEA | Sell signal |
| Above Zero | DIF > 0 | Bullish trend |
| Below Zero | DIF < 0 | Bearish 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:
| Signal | Condition | Meaning |
|---|---|---|
| Touching Upper Band | Price > Upper Band | Overbought |
| Touching Lower Band | Price < Lower Band | Oversold |
| Band Narrowing | Upper - Lower Band decreasing | Volatility decreasing, potential breakout |
| Band Widening | Upper - Lower Band increasing | Volatility 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:
| Signal | Condition | Meaning |
|---|---|---|
| Oversold | %K < 20 | Price may bounce |
| Overbought | %K > 80 | Price may pull back |
| Golden Cross | %K crosses above %D | Buy signal |
| Death Cross | %K crosses below %D | Sell 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
| Capital | Recommended Max Positions | Per-Trade Position |
|---|---|---|
| Below 1000 USDT | 2–3 | 30–50% |
| 1000–5000 USDT | 3–5 | 20–30% |
| Above 5000 USDT | 5–8 | 10–20% |
6.3 Stoploss Settings Recommendations
| Market Volatility | Recommended Stoploss | Description |
|---|---|---|
| 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
- Triple Confirmation: All three indicators must agree, high signal quality, fewer false signals
- Multi-Dimensional Analysis: Trend (MACD), Position (Bollinger Bands), Momentum (Stochastic) fully covered
- Classic and Reliable: All three are decades-old classic indicators
- Broad Applicability: Usable across multiple markets and trading pairs
- Clear Logic: Each indicator's role is explicit, easy to understand and optimize
Cons
- Sparse Signals: All three conditions being satisfied simultaneously is rare, low trading frequency
- More Lag: All three indicators have some lag, may miss optimal entry points
- Complex Parameters: Need to tune three indicators simultaneously, high optimization difficulty
- Average Performance in Trending Markets: Triple confirmation may miss entry opportunities in strong trends
- Ineffective in Extreme Consolidation: All three indicators may fail in extreme sideways markets
VIII. Applicable Scenarios
| Market Environment | Recommended Config | Description |
|---|---|---|
| Ranging Market | Focus on it | Stochastic overbought/oversold signals effective |
| Uptrend | Use cautiously | Triple confirmation may miss quick moves |
| Downtrend | Reduce trades | Same as above |
| Sideways Consolidation | Good for it | Many range-trading opportunities |
| High Volatility | Adjust stoploss | May 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 Type | Performance Rating | Analysis |
|---|---|---|
| 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 Item | Recommended Value | Description |
|---|---|---|
| Trading Pairs | Medium-volatility tokens | Avoid extreme volatility or extreme calm |
| Timeframe | 15m (default) | Adjustable based on token characteristics |
| Stoploss | -8% (default) | Adjust based on volatility |
| Trailing Stop | Enable | Protect profits |
X. Summary
MACD_BB_Stoch is a classic triple-indicator combination strategy. Its core value lies in:
- Triple Confirmation Mechanism: MACD + Bollinger Bands + Stochastic triple verification, improving signal quality
- Multi-Dimensional Analysis: Trend, position, momentum three dimensions fully covered
- Classic and Reliable: All three indicators are time-tested classic tools
- 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