Skip to main content

Hacklemore3 Strategy: In-Depth Analysis

Strategy ID: #194 (194th of 465 strategies) Strategy Type: Trend Following / Dynamic Take-Profit Timeframe: 5 Minutes (5m)


I. Strategy Overview

Hacklemore3 is the third version in the Hacklemore series, a trend-following strategy based on the 5-minute timeframe. Compared to Hacklemore2 (15-minute version), Hacklemore3's core innovation is the dual-mode exit mechanism: when profitable, it uses dynamic trailing stop to protect profits; when in loss, it relies on trend and momentum indicators to judge exit timing.

Core Features

FeatureDescription
Entry ConditionsUptrend + RMI strong + SAR confirmation + Volume filter
Exit ConditionsDual-mode: Dynamic trailing stop when profitable / Trend+momentum when in loss
ProtectionsTrailing stop + Hard stop-loss + ROI tiered take-profit
Timeframe5 Minutes (short-term)
DependenciesTA-Lib, technical (RMI, qtpylib)

Differences from Hacklemore2

ComparisonHacklemore2Hacklemore3
Timeframe15 Minutes5 Minutes
Trade FrequencyMediumHigher
Exit LogicUnified modeDual-mode (profit/loss separate)
Take-Profit StrategyROI tiered mainlyDynamic trailing mainly
Applicable ScenarioMid-term trendShort-term swing

II. Strategy Configuration Analysis

2.1 Core Risk Parameters

# ROI Exit Table
minimal_roi = {
"0": 0.15, # Immediate exit: 15% profit
"5": 0.015 # After 5 minutes: 1.5% profit
}

# Stop-Loss Settings
stoploss = -0.10 # -10% hard stop-loss

# Trailing Stop
trailing_stop = True
trailing_stop_positive = 0.02 # Activate trailing at 2% profit
trailing_stop_positive_offset = 0.03 # 3% offset

Design Philosophy:

  • High Target Profit: Initial target 15%, suitable for capturing strong trends
  • Fast Step-Down: Target drops to 1.5% after 5 minutes, adapting to short-term rhythm
  • Moderate Hard Stop-Loss: -10% provides sufficient volatility room
  • Trailing Stop: Activates at 2% profit, effectively locking in gains

2.2 Order Type Configuration

order_types = {
'buy': 'limit',
'sell': 'limit',
'stoploss': 'market',
'stoploss_on_exchange': False
}

III. Entry Conditions Details

3.1 Core Entry Logic

The strategy uses a quadruple-confirmation mechanism — all conditions must be met simultaneously:

Condition #Condition NameLogic Description
Condition 1Uptrend Confirmationup_trend == True (recent high judgment)
Condition 2RMI StrongRMI > 55 and RMI >= RMI.rolling(3).mean()
Condition 3SAR Confirmationsar < close (price above SAR)
Condition 4Volume Filtervolume < volume_ma * 30

3.2 Entry Conditions Explained

Condition #1: Uptrend Confirmation

dataframe['up_trend'] == True

Logic:

  • Confirms uptrend by price making a recent high
  • Ensures entry only when trend is clear
  • Avoids frequent trading in ranging or declining markets

Condition #2: RMI Strong

(dataframe['RMI'] > 55) & (dataframe['RMI'] >= dataframe['RMI'].rolling(3).mean())

Logic:

  • RMI (Relative Momentum Index) is a variant of RSI focused on momentum changes
  • RMI > 55 indicates momentum is in the strong zone
  • RMI above its 3-period moving average confirms momentum is strengthening

Condition #3: SAR Confirmation

dataframe['sar'] < dataframe['close']

Logic:

  • Parabolic SAR is below price
  • Confirms current uptrend
  • Provides additional trend direction verification

Condition #4: Volume Filter

dataframe['volume'] < dataframe['volume_ma'] * 30

Logic:

  • Volume should not be abnormally inflated
  • Avoids entry during extreme market conditions (e.g., breaking news)
  • Normal volume environment favors trend continuation

3.3 Comprehensive Entry Signal Assessment

The strategy's entry logic can be summarized as:

Trend confirmed + Momentum strong + Multi-verification — only considers entry when uptrend is clear, RMI momentum is strengthening, SAR confirms trend direction, and volume is normal.


IV. Exit Logic Details

4.1 Dual-Mode Exit Mechanism

Hacklemore3's core innovation is using different exit strategies based on profit/loss state:

ModeTrigger ConditionCore Logic
Loss Modecurrent_profit < 0Trend broken + momentum decayed → Exit
Profit Modecurrent_profit > 0Dynamic trailing stop → Protect profits

4.2 Loss Mode: Trend-Based Exit

# Exit Signal 1: Downtrend confirmed
dataframe['dn_trend'] == True

# Exit Signal 2: RMI momentum weak
dataframe['RMI'] < 50

Logic:

  • When position is in loss, strategy focuses more on whether trend is broken
  • dn_trend == True indicates trend has reversed
  • RMI < 50 indicates momentum has decayed to the weak zone
  • Both conditions must be met simultaneously to trigger exit

Design Philosophy:

In loss, give the trend a "second chance" — only admit defeat when trend clearly reverses and momentum decays, avoiding being stopped out by normal fluctuations.

4.3 Profit Mode: Dynamic Trailing Stop

# Dynamic trailing stop logic
if current_profit > 0:
# Price drops below 80% of the highest price
price_drop = current_price < max_price * 0.8
# Consecutive decline
consecutive_drop = dataframe['close'] < dataframe['close'].shift(1)

if price_drop and consecutive_drop:
sell_signal = True

Logic:

  • When position is profitable, strategy records the highest price during holding
  • If price falls below 80% of the highest price (20% pullback), and consecutive decline occurs, trigger exit
  • This mechanism allows profits to run while protecting in a timely manner when trend turns

Design Philosophy:

In profit, "let profits run" — continue holding as long as price hasn't pulled back significantly, using dynamic stop to protect accumulated gains.

4.4 ROI Tiered Take-Profit Mechanism

The strategy also retains ROI tiered take-profit:

Holding TimeTarget ProfitDesign Intent
Immediate15%Capture large profits from strong trends
After 5 minutes1.5%Quick lock-in, adapting to short-term rhythm

V. Technical Indicator System

5.1 Core Indicators

Indicator CategorySpecific IndicatorsPurpose
Momentum IndicatorRMI (Relative Momentum Index)Judges momentum strength and direction
Trend IndicatorEMAConfirms trend direction
Reversal IndicatorSAR (Parabolic SAR)Trend reversal confirmation
Trend JudgmentRecent HighConfirms uptrend
VolumeVolume MAFilters abnormal volume

5.2 RMI Indicator Explained

RMI (Relative Momentum Index) is a variant of RSI:

  • Traditional RSI calculates price changes; RMI calculates momentum changes
  • Compared to RSI, RMI is more sensitive to trend changes
  • Overbought zone: RMI > 70
  • Oversold zone: RMI < 30
  • Strong zone: RMI > 55 (this strategy's buy threshold)
  • Weak zone: RMI < 50 (this strategy's sell threshold)

5.3 SAR Indicator Explained

Parabolic SAR:

  • Used to determine trend direction and reversal points
  • SAR below price: uptrend
  • SAR above price: downtrend
  • Used in this strategy for trend confirmation

VI. Risk Management Highlights

6.1 Trailing Stop Mechanism

trailing_stop = True
trailing_stop_positive = 0.02
trailing_stop_positive_offset = 0.03

Design Philosophy:

  • Activates trailing stop when profit reaches 2%
  • Trail offset of 3% gives some pullback room
  • Effectively protects accumulated profits without being stopped out too early

6.2 Hard Stop-Loss Protection

stoploss = -0.10  # -10%

Design Philosophy:

  • Moderate stop-loss suitable for trend strategies
  • Provides sufficient volatility room
  • Avoids "bouncing right back after being stopped out"

6.3 Multi-Layer Risk Protection

Protection LayerTrigger ConditionFunction
ROI Take-ProfitProfit target reachedLock in gains
Trailing StopPullback after 2% profitProtect profits
Dynamic Stop20% price pullback when profitableTrend reversal exit
Trend StopLoss + trend reversalControl losses
Hard Stop-Loss-10%Last line of defense

VII. Strategy Pros & Cons

Strengths

  1. Dual-Mode Exit Mechanism: Protects profits when profitable, gives trend a "second chance" when losing — clear and reasonable logic
  2. Strong Short-Term Adaptability: 5-minute timeframe, suitable for short-term trading and quick reactions
  3. Complete Risk Control: Trailing stop + Hard stop-loss + Dynamic stop + ROI tiered, multi-layer protection
  4. Multi-Indicator Confirmation: RMI + SAR + Trend judgment, reliable signals

Weaknesses

  1. High Trading Costs: 5-minute level trades frequently; fees and slippage significantly impact
  2. Average Performance in Ranging Markets: Common weakness of trend strategies; may frequently get stopped out in ranging markets
  3. Parameter Sensitivity: RMI threshold, SAR parameters need adjustment for different trading pairs
  4. Lagging: Trend confirmation has lag, may miss optimal entry points

VIII. Applicable Scenarios

Market EnvironmentRecommendationNotes
Unilateral UpwardStrongly RecommendedCore scenario, trend-following effective
DowntrendNot RecommendedWill not trigger buy signals
Ranging MarketUse with CautionMay frequently get stopped out
High VolatilityAdjust ParametersMay widen stop-loss or adjust RMI threshold

IX. Applicable Market Environment Analysis

Hacklemore3 is a typical short-term trend-following strategy. Based on its code architecture and dual-mode exit mechanism, it is best suited for unilateral upward markets, and performs poorly in ranging or declining markets.

9.1 Strategy Core Logic

  • Enter on trend confirmation: Recent high + RMI strong + SAR confirmation
  • Dual-mode exit: Loss mode watches trend; profit mode watches pullback
  • Dynamic protection: Activates dynamic trailing stop when profitable
  • Volume filter: Avoids extreme market conditions

9.2 Performance in Different Market Environments

Market TypeRatingAnalysis
Unilateral Upward★★★★★Core scenario, dual-mode exit effectively protects profits
Ranging Market★★★☆☆Fewer signals, may be repeatedly stopped out
Unilateral Downward☆☆☆☆☆Will not trigger buy signals, no trades
High Volatility★★★☆☆Trailing stop may trigger prematurely

9.3 Key Configuration Recommendations

Config ItemSuggested ValueNotes
trailing_stop_positive0.02-0.03Adjust based on volatility
RMI Buy Threshold50-60Higher = stricter
RMI Sell Threshold45-55Lower = more tolerant
Stop-Loss-0.08 ~ -0.12Adjust based on trading pair characteristics

X. Important Notes: The Cost of Complexity

10.1 Learning Curve

Hacklemore3 involves multiple technical indicators and dual-mode exit logic:

  • RMI (Relative Momentum Index)
  • SAR (Parabolic SAR)
  • Trend judgment (recent high)
  • Dynamic trailing stop mechanism

Understanding each indicator's principles and dual-mode exit trigger conditions is necessary; beginners should first understand each indicator's meaning.

10.2 Hardware Requirements

Number of PairsMinimum RAMRecommended RAM
Under 10 pairs2GB4GB
10-30 pairs4GB8GB
Over 30 pairs8GB16GB

10.3 Backtesting vs. Live Trading Differences

Notes:

  • 5-minute level trades frequently; slippage impact is greater in live trading
  • Dynamic trailing stop may lag in fast-moving markets
  • Fee costs are proportionally higher in short-term strategies
  • Recommended to increase fee settings in backtesting

10.4 Manual Trading Suggestions

If you want to manually apply this strategy's logic:

  1. Observe whether price has made a recent high
  2. Confirm RMI is in the strong zone (>55)
  3. Check if SAR is below price
  4. After entry, record the highest price; consider exiting on 20% pullback
  5. When in loss, check whether trend has reversed, rather than holding desperately

XI. Summary

Hacklemore3 is a strategy focused on short-term trend following. Its core value lies in:

  1. Dual-Mode Exit Mechanism: Dynamic protection when profitable, trend judgment when losing — clear and reasonable logic
  2. Strong Short-Term Adaptability: 5-minute timeframe, suitable for capturing short-term trend opportunities
  3. Complete Risk Control: Trailing stop + Hard stop-loss + Dynamic stop + ROI tiered, multi-layer protection
  4. Multi-Indicator Confirmation: RMI + SAR + Trend judgment, improves signal reliability

For quantitative traders, Hacklemore3 is the short-term version of the Hacklemore series. Compared to Hacklemore2 (15 minutes), it is more suitable for short-term traders but requires attention to trading cost impact. Its dual-mode exit mechanism is a noteworthy design idea — using different exit strategies based on position state, achieving balance between profit protection and risk control.