Skip to main content

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

FeatureDescription
Entry Conditions2 modes (BinHV45 variant + Cluc variant)
Exit ConditionsMulti-condition combination (BB middle band + EMA + Fisher RSI)
ProtectionTrailing stop + Order timeout check
Timeframe5 minutes
DependenciesTA-Lib, technical, numpy
Special FeaturesOrder 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 CategorySpecific IndicatorParametersPurpose
VolatilityBollinger Bands40 periods, 2 std devBinHV45 variant
VolatilityBollinger Bands20 periods, 2 std devCluc variant
TrendEMA6, 48 periodsShort/long-term trend
MomentumFisher RSI9-period RSI + Fisher transformOverbought/oversold
StoplossSARDefaultTrend-following stop
VolumeVolume MA24 periodsVolume filter

5.2 Dual Bollinger Band System

The strategy uses two Bollinger Band systems:

Bollinger BandPeriodStd DevPurpose
BB1402BinHV45 variant strategy
BB2202Cluc 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:

  1. Trailing stop activates after profit reaches 3.668%
  2. Triggers exit when pulling back 1.057% from highest point
  3. 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

  1. Dual Bollinger Bands: 40-period + 20-period, covers different time dimensions
  2. Fisher RSI: Normalized RSI is more sensitive
  3. Order book check: Uses real-time order book to optimize order execution
  4. Order timeout: Prevents orders from not filling due to price movement
  5. Hyperparameter optimization: Key parameters from hyperopt

⚠️ Limitations

  1. High complexity: Dual BB + multiple indicators, difficult to debug
  2. Order book dependency: Requires exchange to support orderbook API
  3. Parameter sensitivity: Hyperopt results may overfit
  4. Extremely loose stoploss: -34.299% stoploss may cause large losses in extreme markets
  5. High computation: Dual BB increases computational burden

VIII. Applicable Scenarios

Market EnvironmentRecommended ConfigurationNote
Ranging marketDefault configurationDual BB suitable for ranging
UptrendDefault configurationTrailing stop locks profits
DowntrendPause or light positionNo trend filter, easy to lose
High volatilityAdjust parametersMay need to adjust stoploss threshold
Low volatilityAdjust ROILower 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 TypePerformance RatingReason 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

ConfigurationRecommended ValueNote
Number of pairs20-40Moderate signal frequency
Max positions3-6Control risk
Position modeFixed positionRecommended fixed position
Timeframe5mMandatory 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 PairsMinimum RAMRecommended RAM
20-40 pairs1GB2GB
40-80 pairs2GB4GB

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:

  1. Dual Bollinger Bands: 40-period + 20-period, covers different time dimensions
  2. Fisher RSI: Normalized RSI is more sensitive
  3. Order book optimization: Uses real-time order book for price check and order cancellation
  4. Trailing stop: Locks profits, protects gains
  5. 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