ClucFiatROI Strategy Analysis
Strategy Number: #17 (17th of 465 strategies)
Strategy Type: Bollinger Bands + Fisher RSI + Order Book Check
Timeframe: 5 minutes (5m)
I. Strategy Overview
ClucFiatROI is a combined strategy based on Bollinger Bands and Fisher RSI, integrating classic logic from the Cluc strategy series. The strategy features a dual Bollinger Band system (40-period and 20-period) and introduces an order book check mechanism to optimize order execution.
Core Features
| Feature | Description |
|---|---|
| Entry Conditions | 2 modes (BinHV45 variant + Cluc variant) |
| Exit Conditions | Multi-condition combination (BB middle band + EMA + Fisher RSI) |
| Protection | Trailing stop + Order timeout check |
| Timeframe | 5 minutes |
| Dependencies | TA-Lib, technical, numpy |
| Special Features | Order book check, order timeout cancellation, dual Bollinger Bands |
II. Strategy Configuration Analysis
2.1 Base Risk Parameters
# ROI exit table (hyperopt results)
minimal_roi = {
"0": 0.04354, # Immediate exit: 4.35% profit
"5": 0.03734, # After 5 minutes: 3.73% profit
"8": 0.02569, # After 8 minutes: 2.57% profit
"10": 0.019, # After 10 minutes: 1.9% profit
"76": 0.01283, # After 76 minutes: 1.28% profit
"235": 0.007, # After 235 minutes: 0.7% profit
"415": 0, # After 415 minutes: exit at breakeven
}
# Stoploss setting
stoploss = -0.34299 # -34.299% hard stoploss (extremely loose)
# Trailing stop
trailing_stop = True
trailing_stop_positive = 0.01057 # 1.057% trailing activation
trailing_stop_positive_offset = 0.03668 # 3.668% offset trigger
trailing_only_offset_is_reached = True
Design Logic:
- Multi-level ROI: 7-level decreasing ROI, longer holding time means lower exit threshold
- Extremely loose stoploss: -34.299% hard stoploss, gives ample room for fluctuation
- Trailing stop: Activates 1.06% trailing after 3.67% profit
2.2 Hyperparameters
# Buy hyperparameters (optimized results)
buy_params = {
"bbdelta-close": 0.00642,
"bbdelta-tail": 0.75559,
"close-bblower": 0.01415,
"closedelta-close": 0.00883,
"fisher": -0.97101,
"volume": 18,
}
# Sell hyperparameters
sell_params = {
"sell-bbmiddle-close": 0.95153,
"sell-fisher": 0.60924,
}
III. Entry Conditions Details
3.1 Entry Logic (No Position)
# Entry conditions when no position (two modes)
conditions = [
# Mode 1: BinHV45 variant
(
(bb1_delta > close * bbdelta_close) &
(closedelta > close * closedelta_close) &
(tail < bb1_delta * bbdelta_tail) &
(close < lower_bb1.shift()) &
(close <= close.shift())
)
|
# Mode 2: Cluc variant
(
(close < ema_slow) &
(close < close_bblower * lower_bb2) &
(volume < volume_mean_slow.shift(1) * volume)
)
]
# Fisher RSI filter
conditions.append(fisher_rsi < fisher)
Logic Analysis:
- Mode 1 (BinHV45 variant):
- Bollinger Band bandwidth > 0.642%
- Price change > 0.883%
- Lower shadow < 75.559% of bandwidth
- Price < previous BB lower band
- Price not higher than previous close
- Mode 2 (Cluc variant):
- Price < EMA48
- Price < BB lower band × 0.98585
- Volume < average volume × 18
- Fisher RSI filter: Fisher RSI < -0.97101 (deeply oversold)
3.2 Entry Logic (With Position)
# Add position conditions when already holding
conditions = [
close > close.shift(), # Price increasing
close > sar, # Price > SAR
]
Note: When already holding a position, consider adding only when price is rising and SAR confirms.
IV. Exit Logic Explained
4.1 Exit Conditions
# Exit conditions
(
(close * sell_bbmiddle_close) > mid_bb2 & # Price × 0.95153 > BB middle band
ema_fast > close & # EMA6 > price
fisher_rsi > sell_fisher & # Fisher RSI > 0.60924
volume > 0 # Volume > 0
)
Logic Analysis:
- Price near middle band: Price × 0.95153 > BB middle band (price approaching middle band)
- EMA confirmation: EMA6 above price (short-term trend weakening)
- Fisher RSI overbought: Fisher RSI > 0.60924
- Volume confirmation: Volume greater than 0
Combined meaning: Exit when price returns near BB middle band, short-term trend weakens, and Fisher RSI is overbought.
4.2 Order Timeout Check
# Buy order timeout check
def check_entry_timeout(self, pair, trade, order, **kwargs) -> bool:
ob = self.dp.orderbook(pair, 1)
current_price = ob["bids"][0][0]
if current_price > order["price"] * 1.01: # Price increased over 1%
return True # Cancel order
return False
# Sell order timeout check
def check_exit_timeout(self, pair, trade, order, **kwargs) -> bool:
ob = self.dp.orderbook(pair, 1)
current_price = ob["asks"][0][0]
if current_price < order["price"] * 0.99: # Price decreased over 1%
return True # Cancel order
return False
Purpose:
- Prevent orders from not filling due to price movement
- Cancel orders when price deviation exceeds 1%
V. Technical Indicator System
5.1 Core Indicators
| Indicator Category | Specific Indicator | Parameters | Purpose |
|---|---|---|---|
| Volatility | Bollinger Bands | 40 periods, 2 std dev | BinHV45 variant |
| Volatility | Bollinger Bands | 20 periods, 2 std dev | Cluc variant |
| Trend | EMA | 6, 48 periods | Short/long-term trend |
| Momentum | Fisher RSI | 9-period RSI + Fisher transform | Overbought/oversold |
| Stoploss | SAR | Default | Trend-following stop |
| Volume | Volume MA | 24 periods | Volume filter |
5.2 Dual Bollinger Band System
The strategy uses two Bollinger Band systems:
| Bollinger Band | Period | Std Dev | Purpose |
|---|---|---|---|
| BB1 | 40 | 2 | BinHV45 variant strategy |
| BB2 | 20 | 2 | Cluc variant strategy |
VI. Risk Management Features
6.1 Extremely Loose Hard Stoploss
stoploss = -0.34299 # -34.299%
Note: Extremely loose stoploss, gives ample room for fluctuation.
6.2 Trailing Stop
trailing_stop = True
trailing_stop_positive = 0.01057
trailing_stop_positive_offset = 0.03668
trailing_only_offset_is_reached = True
Working mechanism:
- Trailing stop activates after profit reaches 3.668%
- Triggers exit when pulling back 1.057% from highest point
- Needs to reach offset before trailing activates
6.3 Order Timeout Check
Buy orders:
- Cancel when current price > order price × 1.01
Sell orders:
- Cancel when current price < order price × 0.99
VII. Strategy Pros & Cons
✅ Advantages
- Dual Bollinger Bands: 40-period + 20-period, covers different time dimensions
- Fisher RSI: Normalized RSI is more sensitive
- Order book check: Uses real-time order book to optimize order execution
- Order timeout: Prevents orders from not filling due to price movement
- Hyperparameter optimization: Key parameters from hyperopt
⚠️ Limitations
- High complexity: Dual BB + multiple indicators, difficult to debug
- Order book dependency: Requires exchange to support orderbook API
- Parameter sensitivity: Hyperopt results may overfit
- Extremely loose stoploss: -34.299% stoploss may cause large losses in extreme markets
- High computation: Dual BB increases computational burden
VIII. Applicable Scenarios
| Market Environment | Recommended Configuration | Note |
|---|---|---|
| Ranging market | Default configuration | Dual BB suitable for ranging |
| Uptrend | Default configuration | Trailing stop locks profits |
| Downtrend | Pause or light position | No trend filter, easy to lose |
| High volatility | Adjust parameters | May need to adjust stoploss threshold |
| Low volatility | Adjust ROI | Lower ROI threshold for small moves |
IX. Applicable Market Environments Explained
ClucFiatROI is a strategy based on the core philosophy of "dual Bollinger Bands + Fisher RSI".
9.1 Strategy Core Logic
- Dual Bollinger Bands: 40-period + 20-period, covers different time dimensions
- Fisher RSI: Normalized RSI is more sensitive
- Order book optimization: Uses real-time order book for price check and order cancellation
9.2 Performance in Different Market Environments
| Market Type | Performance Rating | Reason Analysis |
|---|---|---|
| 📈 Slow bull/ranging up | ★★★★☆ | Dual BB + trailing stop performs well |
| 🔄 Wide ranging | ★★★★☆ | Dual BB suitable for ranging markets |
| 📉 Single-sided crash | ★★☆☆☆ | No trend filter, may lose consecutively |
| ⚡️ Extreme sideways | ★★★☆☆ | Too little volatility, signals reduce |
9.3 Key Configuration Recommendations
| Configuration | Recommended Value | Note |
|---|---|---|
| Number of pairs | 20-40 | Moderate signal frequency |
| Max positions | 3-6 | Control risk |
| Position mode | Fixed position | Recommended fixed position |
| Timeframe | 5m | Mandatory requirement |
X. Important Note: Order Book Dependency
10.1 Moderate Learning Curve
Strategy code is about 150 lines, requires understanding dual Bollinger Bands and order book mechanism.
10.2 Moderate Hardware Requirements
Dual Bollinger Bands increase computation:
| Number of Pairs | Minimum RAM | Recommended RAM |
|---|---|---|
| 20-40 pairs | 1GB | 2GB |
| 40-80 pairs | 2GB | 4GB |
10.3 Order Book Dependency
Strategy uses self.dp.orderbook() to get real-time order book:
- Requires exchange to support orderbook API
- Order book data may have latency in live trading
- Order book data may be inaccurate in backtesting
10.4 Manual Trader Recommendations
Manual traders can reference this strategy's dual BB approach:
- Observe both 40-period and 20-period Bollinger Bands
- Use Fisher RSI to confirm overbought/oversold
- Set order timeout cancellation mechanism
XI. Summary
ClucFiatROI is a well-designed dual Bollinger Band strategy. Its core value lies in:
- Dual Bollinger Bands: 40-period + 20-period, covers different time dimensions
- Fisher RSI: Normalized RSI is more sensitive
- Order book optimization: Uses real-time order book for price check and order cancellation
- Trailing stop: Locks profits, protects gains
- Hyperparameter optimization: Key parameters from hyperopt
For quantitative traders, this is an excellent dual Bollinger Band strategy template. Recommendations:
- Use as an advanced case study for learning dual Bollinger Bands
- Understand Fisher RSI application methods
- Learn order book check and order timeout mechanisms
- Note that hyperparameters may overfit, test thoroughly before live trading