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
| Feature | Description |
|---|---|
| Buy Conditions | 5 conditions must be met simultaneously (Bollinger Band position + EMA trend) |
| Sell Conditions | 2 exit paths (RSI overbought / middle track breakdown) |
| Protection Mechanisms | EMA multi-layer trend confirmation + Bollinger Band position filtering |
| Timeframe | 15m main timeframe |
| Dependencies | talib, 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 Number | Condition Content | Logical Meaning |
|---|---|---|
| Condition 1 | close > bb_middleband | Price is above Bollinger Band middle track |
| Condition 2 | close < bb_upperband | Price is below Bollinger Band upper track |
| Condition 3 | close > ema9 | Price is above short-term EMA |
| Condition 4 | close > ema200 | Price is above long-term EMA |
| Condition 5 | ema20 > ema200 | Medium-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 Path | Trigger Condition | Meaning |
|---|---|---|
| Path 1 | RSI > 75 | RSI 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 Category | Specific Indicator | Usage |
|---|---|---|
| Bollinger Bands | 20 periods, 2 standard deviations | Price channel positioning |
| EMA | 9/20/200 periods | Multi-layer trend confirmation |
| RSI | 14 periods | Overbought/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 Period | Usage | Time Span |
|---|---|---|
| EMA9 | Short-term trend | Approximately 2.25 hours (15m × 9) |
| EMA20 | Medium-term trend | Approximately 5 hours |
| EMA200 | Long-term trend | Approximately 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 Item | Value | Description |
|---|---|---|
| trailing_stop | True | Enable trailing stop |
| trailing_stop_positive | 1.007% | Trailing stop distance |
| trailing_stop_positive_offset | 1.821% | Activation threshold |
| trailing_only_offset_is_reached | True | Activate after reaching threshold |
Feature: Trailing activates only after 1.821% profit, locking in at least 1% profit.
7. Strategy Advantages and Limitations
✅ Advantages
- Simple Logic: Clear buy/sell conditions, easy to understand and maintain
- Trend Following: Multi-layer EMA ensures trend-following trading
- Complete Risk Control: RSI take-profit + middle track stop loss + trailing stop
- Reasonable Stop Loss: 23.7% stop loss is moderate, won't stop out too early
- Exchange Stop Loss: Reduces slippage risk
⚠️ Limitations
- Strict Conditions: 5 buy conditions must be met simultaneously, may miss opportunities
- No Hyperopt Parameters: Cannot adjust parameters based on market conditions
- Fixed RSI Threshold: Fixed value of 75 may not apply to all markets
- Bollinger Band Limitations: Channel continuously expands in trending markets
8. Recommended Usage Scenarios
| Market Environment | Recommended Action | Description |
|---|---|---|
| Bullish Trend | Applicable | Strategy's core scenario |
| Oscillating Uptrend | Applicable | In-channel pullback buying is effective |
| Bearish Trend | Not Applicable | EMA200 filter will prevent buying |
| High Volatility Market | Use Caution | May 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 Type | Performance Rating | Reason 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 Item | Suggested Value | Description |
|---|---|---|
| Timeframe | 15m (default) | Suitable for intraday trading |
| Stop Loss | -0.237 (default) | Moderate, acceptable |
| Trading Pairs | Major coins | Sufficient liquidity |
| Market Selection | Bull market or oscillating uptrend | Trend 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 Pairs | Minimum RAM | Recommended RAM |
|---|---|---|
| 1-50 pairs | 2GB | 4GB |
| 50-200 pairs | 4GB | 8GB |
| 200+ pairs | 8GB | 16GB |
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:
- Clear Logic: Explicit buy/sell conditions, easy to understand
- Trend Filtering: EMA200 ensures only long positions, no shorts
- Complete Risk Control: Multiple take-profit and stop-loss mechanisms
- 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.