Skip to main content

BbRoi Strategy In-Depth Analysis

Strategy Number: #460 (460th out of 465 strategies)
Strategy Type: Bollinger Band Channel Trend Following + EMA Multi-Layer Confirmation
Timeframe: 15 minutes (15m)


1. Strategy Overview

BbRoi is a concise and efficient trend-following strategy that combines Bollinger Band channels with an EMA moving average system for trading. The core strategy is to buy when price is located in the "in-channel" area above the Bollinger Band middle track and below the upper track, while confirming an EMA bullish trend. It sells when RSI is overbought or when price falls below the middle track. Compared to the complex Bandtastic strategy, BbRoi has a more streamlined design with clear logic.

Core Features

FeatureDescription
Buy Conditions5 conditions must be met simultaneously (Bollinger Band position + EMA trend)
Sell Conditions2 exit paths (RSI overbought / middle track breakdown)
Protection MechanismsEMA multi-layer trend confirmation + Bollinger Band position filtering
Timeframe15m main timeframe
Dependenciestalib, pandas, qtpylib

2. Strategy Configuration Analysis

2.1 Base Risk Parameters

# ROI Exit Table
minimal_roi = {
"0": 0.17552, # Immediate profit at 17.552%
"53": 0.11466, # Drops to 11.466% after 53 minutes
"226": 0.06134, # Drops to 6.134% after 226 minutes
"400": 0 # Exit after 400 minutes
}

# Stop Loss Settings
stoploss = -0.23701 # 23.701% hard stop loss

# Trailing Stop
trailing_stop = True
trailing_stop_positive = 0.01007 # Activate after 1.007% profit
trailing_stop_positive_offset = 0.01821 # Activation point at 1.821%
trailing_only_offset_is_reached = True # Activate only after reaching threshold

Design Rationale:

  • ROI settings are aggressive, with an initial target of 17.552%, gradually decreasing
  • Stop loss at 23.7% is moderate, giving price some fluctuation room
  • Trailing stop activates after 1.821% profit, locking in 1% profit

2.2 Order Type Configuration

order_types = {
'buy': 'market', # Market orders for buying
'sell': 'market', # Market orders for selling
'stoploss': 'limit', # Limit orders for stop loss
'stoploss_on_exchange': True # Stop loss executed on exchange
}

Feature: Uses exchange stop loss to reduce slippage risk.


3. Buy Conditions Detailed Analysis

3.1 Buy Conditions (5 Conditions Must Be Met Simultaneously)

The strategy requires all buy conditions to be met simultaneously, forming a "strict entry" mode:

Condition NumberCondition ContentLogical Meaning
Condition 1close > bb_middlebandPrice is above Bollinger Band middle track
Condition 2close < bb_upperbandPrice is below Bollinger Band upper track
Condition 3close > ema9Price is above short-term EMA
Condition 4close > ema200Price is above long-term EMA
Condition 5ema20 > ema200Medium-term EMA is above long-term EMA (uptrend)

3.2 Buy Logic Diagram

Bollinger Band Upper Track (bb_upperband)

| ┌─────────────────────┐
| │ Valid Buy Area │
| │ (Middle < Price < Upper)│
| │ │
| └─────────────────────┘

Bollinger Band Middle Track (bb_middleband)

Also must satisfy:
- close > ema9 > ema200
- ema20 > ema200

3.3 Buy Signal Interpretation

Bollinger Band Conditions:

  • Price above middle track: Indicates price is in the upper half of the Bollinger Band channel
  • Price below upper track: Avoids chasing highs, not buying at extreme positions

EMA Conditions:

  • close > ema9: Short-term trend is upward
  • close > ema200: Long-term trend is upward
  • ema20 > ema200: Medium-term trend confirms upward

Comprehensive Judgment: This is a typical "trend following + pullback buy" strategy, only entering at pullback positions within a bullish trend.


4. Sell Logic Detailed Analysis

4.1 Sell Conditions (2 Exit Paths)

Sell conditions use "OR" logic—meeting either one triggers a sell:

Exit PathTrigger ConditionMeaning
Path 1RSI > 75RSI overbought, price may pull back
Path 2(close < bb_middleband × 0.97) AND (open > close)Price breaks below middle track by 3% AND is a bearish candle

4.2 Sell Logic Diagram

Exit Path 1: RSI Overbought
──────────────────────
RSI > 75 → Sell signal

Exit Path 2: Trend Reversal Signal
──────────────────────
Price breaks below middle track by 3% + Bearish candle → Sell signal

(Both conditions must be met simultaneously)

4.3 Sell Signal Interpretation

RSI Overbought Exit:

  • RSI > 75 indicates price may be overheated
  • Active take-profit, avoids chasing highs

Middle Track Breakdown Exit:

  • Price breaks below 97% position of Bollinger Band middle track
  • Simultaneously the K-line is bearish (close < open)
  • Indicates trend may be reversing, timely stop loss

5. Technical Indicator System

5.1 Core Indicators

Indicator CategorySpecific IndicatorUsage
Bollinger Bands20 periods, 2 standard deviationsPrice channel positioning
EMA9/20/200 periodsMulti-layer trend confirmation
RSI14 periodsOverbought/oversold judgment

5.2 Indicator Combination Logic

Bollinger Bands (channel position) + EMA (trend direction) + RSI (exit signal)

Buy: Below channel upper track + Trend upward
Sell: RSI overbought OR Trend reversal

5.3 EMA Timeframes

EMA PeriodUsageTime Span
EMA9Short-term trendApproximately 2.25 hours (15m × 9)
EMA20Medium-term trendApproximately 5 hours
EMA200Long-term trendApproximately 50 hours (about 2 days)

Design Intent: EMA200 serves as a long-term trend filter, ensuring trading only occurs within long-term uptrends.


6. Risk Management Features

6.1 Strict Entry Buy Logic

All 5 conditions must be met to buy:

  • Reduces false signals
  • Ensures trend-following trading
  • Avoids chasing highs

6.2 Flexible Sell Logic

2 exit paths:

  • RSI overbought: Active take-profit
  • Middle track breakdown: Trend reversal protection

6.3 Multi-Layer Take-Profit Mechanism

Profit Margin Range    Trigger Time    Signal
──────────────────────────────────────────────
0% → 17.552% Immediate ROI Tier 1
17.552% → 11.466% After 53 min ROI Tier 2
11.466% → 6.134% After 226 min ROI Tier 3
Any profit After 400 min Forced exit

6.4 Trailing Stop Protection

Configuration ItemValueDescription
trailing_stopTrueEnable trailing stop
trailing_stop_positive1.007%Trailing stop distance
trailing_stop_positive_offset1.821%Activation threshold
trailing_only_offset_is_reachedTrueActivate after reaching threshold

Feature: Trailing activates only after 1.821% profit, locking in at least 1% profit.


7. Strategy Advantages and Limitations

✅ Advantages

  1. Simple Logic: Clear buy/sell conditions, easy to understand and maintain
  2. Trend Following: Multi-layer EMA ensures trend-following trading
  3. Complete Risk Control: RSI take-profit + middle track stop loss + trailing stop
  4. Reasonable Stop Loss: 23.7% stop loss is moderate, won't stop out too early
  5. Exchange Stop Loss: Reduces slippage risk

⚠️ Limitations

  1. Strict Conditions: 5 buy conditions must be met simultaneously, may miss opportunities
  2. No Hyperopt Parameters: Cannot adjust parameters based on market conditions
  3. Fixed RSI Threshold: Fixed value of 75 may not apply to all markets
  4. Bollinger Band Limitations: Channel continuously expands in trending markets

Market EnvironmentRecommended ActionDescription
Bullish TrendApplicableStrategy's core scenario
Oscillating UptrendApplicableIn-channel pullback buying is effective
Bearish TrendNot ApplicableEMA200 filter will prevent buying
High Volatility MarketUse CautionMay trigger stop loss frequently

9. Applicable Market Environments Detailed Analysis

BbRoi is a typical trend-following strategy, using Bollinger Band channels to locate entry points and EMA to confirm trend direction. It's best suited for clear upward trending markets.

9.1 Strategy Core Logic

  • Trend Confirmation: EMA200 serves as long-term trend filter
  • Pullback Entry: Buy when price is in the upper half of Bollinger Band channel
  • Multi-Layer Protection: EMA9/20/200 triple confirmation of trend direction

9.2 Performance Across Different Market Environments

Market TypePerformance RatingReason Analysis
📈 Bullish Trend⭐⭐⭐⭐⭐Home turf for trend-following strategies
🔄 Oscillating Uptrend⭐⭐⭐⭐☆In-channel pullback buying is effective
📉 Bearish Trend⭐☆☆☆☆EMA200 filter, basically no trading
⚡️ Violent Volatility⭐⭐☆☆☆May trigger stop loss frequently

9.3 Key Configuration Recommendations

Configuration ItemSuggested ValueDescription
Timeframe15m (default)Suitable for intraday trading
Stop Loss-0.237 (default)Moderate, acceptable
Trading PairsMajor coinsSufficient liquidity
Market SelectionBull market or oscillating uptrendTrend following requires direction

10. Important Reminder: Simple Doesn't Mean Easy

10.1 Learning Curve

Strategy logic is simple, but requires understanding of:

  • Meaning of Bollinger Band channels
  • Principles of EMA multi-layer confirmation
  • RSI overbought/oversold signals

10.2 Hardware Requirements

Strategy has low computation, low hardware requirements:

Number of PairsMinimum RAMRecommended RAM
1-50 pairs2GB4GB
50-200 pairs4GB8GB
200+ pairs8GB16GB

10.3 Differences Between Backtesting and Live Trading

Strategy has few parameters, relatively low overfitting risk. However, still note:

  • Market environment changes may cause strategy failure
  • Fixed parameters cannot adapt to all markets

10.4 Recommendations for Manual Traders

  • Use EMA200 as trend judgment benchmark
  • Look for buy opportunities above Bollinger Band middle track
  • Consider take-profit when RSI > 70
  • Watch for trend reversal when price breaks below middle track

11. Summary

BbRoi is a simply designed trend-following strategy. Its core value lies in:

  1. Clear Logic: Explicit buy/sell conditions, easy to understand
  2. Trend Filtering: EMA200 ensures only long positions, no shorts
  3. Complete Risk Control: Multiple take-profit and stop-loss mechanisms
  4. Simple Parameters: No Hyperopt parameters, reduces overfitting risk

For quantitative traders, BbRoi is an excellent case study for learning Bollinger Band + EMA combination strategies. Compared to Bandtastic's complex configuration, BbRoi is more suitable as a base strategy for use or secondary development.