Skip to main content

BigZ04_TSL3 Strategy Analysis

Strategy Number: #60
Strategy Type: BigZ04 Trailing Stop Version with Adaptive Trailing Stop
Timeframe: 5 minutes (5m) + Information Timeframe 1h


I. Strategy Overview

BigZ04_TSL3 is the trailing stop version of BigZ04, improved by Perkmeister based on BigZ04. This strategy introduces an adaptive trailing stop system (similar to BigPete) on the basis of BigZ04, achieving more flexible profit and loss management. The strategy significantly increases target return from 2.8% to 10%, with complete trailing stop protection.

Core Features

FeatureConfiguration Value
Timeframe5 minutes (5m)
Information Timeframe1 hour (1h)
Take-Profit (ROI)0-30 min: 10%, 30-60 min: 5%, 60+ min: 2%
Stoploss-0.99 (disabled, use adaptive trailing stop)
Trailing StopEnabled, adaptive system
Number of Entry Conditions13 (same as BigZ04)
Recommended Number of Pairs2-4
Core FeatureAdaptive trailing stop system

II. Strategy Configuration Analysis

2.1 Base Configuration

timeframe = "5m"
inf_1h = "1h"

# Aggressive target return settings
minimal_roi = {
"0": 0.10, # Immediate 10% profit on entry
"30": 0.05, # 5% after 30 minutes
"60": 0.02 # 2% after 60 minutes
}

stoploss = -0.99 # Disable default stoploss

# Trailing stop configuration
trailing_stop = True
trailing_stop_positive = True # Use custom

2.2 Adaptive Trailing Stop Parameters

This is TSL3 version's core innovation, implementing multi-level trailing stop:

# Trailing stop parameters
pHSL = -0.08 # Hard stoploss: maximum loss 8%
pPF_1 = 0.016 # Level 1 trigger: 1.6% profit
pSL_1 = 0.011 # Level 1 stoploss: 1.1% profit
pPF_2 = 0.080 # Level 2 trigger: 8% profit
pSL_2 = 0.040 # Level 2 stoploss: 4% profit
pPF_3 = 0.100 # Level 3 trigger: 10% profit
pSL_3 = 0.060 # Level 3 stoploss: 6% profit

2.3 Parameter Comparison

FeatureBigZ04BigZ04_TSL3Change Explanation
First Target ROI2.8%10%Significantly increased
Target Achievement TimeWithin 10 minutesWithin 30 minutesRelaxed
Stoploss TypeFixed timeAdaptive trailingCore difference
Hard Stoploss-10%-8%Improved
Trailing StopSimpleMulti-levelEnhanced

2.4 Core Configuration Code

def custom_stoploss(
self,
pair: str,
trade: "Trade",
current_time: datetime,
current_rate: float,
current_profit: float,
**kwargs,
) -> float:
# Hard stoploss -8%
HSL = -0.08

# Trailing stop parameters
PF_1 = 0.016 # 1.6%
SL_1 = 0.011 # 1.1%
PF_2 = 0.080 # 8%
SL_2 = 0.040 # 4%
PF_3 = 0.100 # 10%
SL_3 = 0.060 # 6%

# Calculate current stoploss line
if current_profit > PF_3:
# Profit > 10%: stoploss line moves to 6% profit position
# And continues following profit upward
sl_profit = SL_3 + (current_profit - PF_3)
elif current_profit > PF_2:
# Profit 8%-10%: linear interpolation
sl_profit = SL_3 - (PF_3 - current_profit) * (SL_3 - SL_2) / (PF_3 - PF_2)
elif current_profit > PF_1:
# Profit 1.6%-8%: linear interpolation
sl_profit = SL_2 - (PF_2 - current_profit) * (SL_2 - SL_1) / (PF_2 - PF_1)
else:
# Profit < 1.6%: hard stoploss
sl_profit = HSL

# Convert to actual stoploss ratio
return stoploss_from_open(sl_profit, current_profit)

III. Entry Conditions Details

BigZ04_TSL3's entry conditions are exactly the same as BigZ04, retaining the 13-condition design.

3.1 Conditions 0-9: Basic Conditions

Same as BigZ04, including RSI oversold, lower Bollinger Band, MACD golden cross and other patterns.

3.2 Condition 10: 1-hour Oversold + MACD Reversal (Core Condition)

This is TSL3 version's main entry source:

(
(dataframe["rsi_1h"] < 35.0) &
(dataframe["close_1h"] < dataframe["bb_lowerband_1h"]) &
(dataframe["hist"] > 0) &
(dataframe["hist"].shift(2) < 0) &
(dataframe["rsi"] < 40.5) &
(dataframe["hist"] > dataframe["close"] * 0.0012) &
(dataframe["open"] < dataframe["close"])
)

Condition 10 and TSL3 Synergy:

Signals generated by Condition 10 often have larger upside potential,combined with 10% target return and trailing stop protection, ideal combination for capturing large-level rebounds.

3.3 Conditions 11-12: Other Patterns

  • Condition 11: Narrow range oscillation breakout (disabled by default)
  • Condition 12: False breakout pattern

IV. Exit Logic Explained (Core Feature)

4.1 ROI Ladder Take-Profit

TSL3's ROI settings more aggressive:

minimal_roi = {
"0": 0.10, # Immediate 10% profit on entry
"30": 0.05, # 5% after 30 minutes
"60": 0.02 # 2% after 60 minutes
}
Holding TimeTarget ReturnExplanation
0-30 minutes10%First target, aggressive
30-60 minutes5%Mid-term target
60+ minutes2%Long-term holding

4.2 Adaptive Trailing Stop System

TSL3's core innovation is implementing multi-level trailing stop:

def custom_stoploss(self, current_profit):
HSL = -0.08 # Hard stoploss

# Stoploss parameters
PF_1, SL_1 = 0.016, 0.011
PF_2, SL_2 = 0.080, 0.040
PF_3, SL_3 = 0.100, 0.060

if current_profit > PF_3:
# Profit > 10%: stoploss line moves up and continues following
# Stoploss line = 6% + (current profit - 10%)
sl_profit = SL_3 + (current_profit - PF_3)
elif current_profit > PF_2:
# Profit 8%-10%: interpolation calculation
# Linearly transition from 4% to 6%
ratio = (PF_3 - current_profit) / (PF_3 - PF_2)
sl_profit = SL_3 - ratio * (SL_3 - SL_2)
elif current_profit > PF_1:
# Profit 1.6%-8%: interpolation calculation
# Linearly transition from 1.1% to 4%
ratio = (PF_2 - current_profit) / (PF_2 - PF_1)
sl_profit = SL_2 - ratio * (SL_2 - SL_1)
else:
# Profit < 1.6%: use hard stoploss
sl_profit = HSL

return stoploss_from_open(sl_profit, current_profit)

Logic Interpretation:

Profit RangeStoploss LineExplanation
Loss-8%Maximum loss 8%, baseline
Profit 0-1.6%-8%Haven't made money yet, use hard stoploss
Profit 1.6%-8%-1.1% to -4%Made some profit, start protecting
Profit 8%-10%-4% to -6%Good returns, strengthen protection
Profit > 10%Continues followingThe more you earn, the tighter the protection

V. Technical Indicator System

5.1 5-Minute Cycle Indicators

Indicator NameParametersUsage
EMA200200Long-term trend judgment
EMA12/2612,26MACD calculation
RSI14Momentum
Bollinger Bands20,2Overbought/oversold
Volume Mean48Volume anomaly detection
CMF20Capital flow judgment

5.2 1-Hour Cycle Indicators

Indicator NameParametersUsage
EMA5050Mid-term trend
EMA200200Long-term trend confirmation
RSI141-hour momentum
Bollinger Bands20,21-hour overbought/oversold

VI. Risk Management Features

6.1 Adaptive Stoploss System

TSL3's core innovation is dynamically adjusting stoploss line based on profit:

  1. Loss Phase (profit < 1.6%):

    • Hard stoploss -8%
    • Allow certain floating loss room
  2. Initial Profit Phase (profit 1.6%-8%):

    • Stoploss line moves up to -1.1% to -4%
    • Protect existing profits
  3. Large Profit Phase (profit > 8%):

    • Stoploss line follows increase
    • Always lock at least 4% profit
  4. Super Profit Phase (profit > 10%):

    • Stoploss line continues following
    • Lock more profits

6.2 Differences from BigZ04

FeatureBigZ04BigZ04_TSL3
Stoploss TypeFixed time stoplossAdaptive trailing stoploss
Hard Stoploss-10%-8%
Trailing StopSimpleMulti-level
Profit Target2.8% first10% first

VII. Strategy Pros & Cons

✅ Advantages

  1. Flexible Stoploss: Automatically adjusts based on profit, controllable risk
  2. High Return Target: 10% target much more aggressive than BigZ04's 2.8%
  3. Can Catch Big Moves: Trailing stop lets you eat more gains
  4. Hard Stoploss Protection: Maximum loss 8%, won't lose everything
  5. Inherited Condition 10: Big cycle reversal signal quality high

⚠️ Limitations

  1. Target Too High: 10% not achievable every time
  2. May Sell Too Early: Trailing stop may exit early
  3. Higher Signal Requirements: Only capturing big rebounds can reach target
  4. Less Friendly to Small Capital: Need larger capital tolerance

VIII. Applicable Scenarios

  • Rebound after big drop
  • High volatility markets
  • Major cryptocurrency pairs
  • Low volatility sideways
  • Violently volatile junk coins
  • Scenarios requiring quick trading

IX. Summary

BigZ04_TSL3 is an enhanced version of BigZ04, achieving smarter risk management through adaptive trailing stop system:

  • ✅ 13 entry conditions, cover various patterns
  • ✅ Trailing stop, protect profits
  • ✅ 8% hard stoploss, control maximum loss
  • ⚠️ Complex parameters, need time to understand
  • ⚠️ 10% first target relatively high

Suitable for: Traders with certain experience, pursuing steady profit growth.


This document is based on BigZ04_TSL3 strategy source code, for learning reference only, not investment advice.