Skip to main content

BinHV27 Strategy Analysis

Strategy ID: #75 (Batch 08, #75)
Strategy Type: Dual Moving Average Crossover Trend + ADX Momentum Confirmation
Timeframe: 5 minutes


I. Strategy Overview

BinHV27 is a quantitative trading strategy contributed by user BinH from the Slack community. The strategy uses dual moving average crossover (120-period SMA and 240-period SMA) as its core, combined with the ADX momentum indicator and RSI oversold conditions to find entry points at trend reversal points.

Unlike common oversold rebound strategies, BinHV27's uniqueness lies in:

  • Ultra-High Take-Profit Target: minimal_roi is set to 100% (i.e., 1), meaning the strategy will not close a position via ROI unless it achieves 100% returns
  • Trend Reversal Confirmation: Uses preparechangetrend and preparechangetrendconfirm to capture inflection points where trends are about to reverse
  • Dual Timeframe Thinking: Uses the relative positions of 120 and 240-period moving averages to determine the market's current phase

Core Characteristics

AttributeDescription
Buy Conditions4 scenarios based on trend phase and ADX strength
Sell Conditions5 scenarios covering trend reversal confirmation and RSI overbought
Protection MechanismsRSI oversold thresholds (20/25), ADX strength thresholds (25/30/35)
Timeframe5 minutes
Stop-Loss MethodFixed stop-loss -10%
Take-Profit MethodExits only when 100% profit is achieved (minimal_roi = {"0": 1})
Suitable MarketStrong trend reversals, violent bottom rebound scenarios

II. Strategy Configuration Analysis

2.1 Core Risk Parameters

# Take-Profit — extremely aggressive 100% target
minimal_roi = {"0": 1}

# Stop-Loss
stoploss = -0.10

Design Philosophy:

  • The 100% initial ROI is extremely rare, indicating the strategy designer's belief that:

    • Either don't enter, or if entering, capture a large-scale reversal
    • The strategy prefers entering at extreme oversold points and waiting for significant recovery
    • Actual exits rely more on sell signals than the ROI mechanism
  • The 10% fixed stop-loss provides a clear loss ceiling

2.2 Timeframe Configuration

timeframe = '5m'

The 5-minute timeframe suits:

  • Intraday traders
  • Capturing short-term rebound opportunities
  • Quickly validating strategy effectiveness

III. Entry Conditions Details

BinHV27's buy conditions use a base conditions + categorized scenarios structure. All scenarios must first satisfy the base conditions.

3.1 Base Conditions (5 items must all be satisfied simultaneously)

dataframe['slowsma'].gt(0) &          # Slow SMA above zero line
dataframe['close'].lt(dataframe['highsma']) & # Price below fast EMA
dataframe['close'].lt(dataframe['lowsma']) & # Price below slow EMA
dataframe['minusdi'].gt(dataframe['minusdiema']) & # DI- crosses above its EMA
dataframe['rsi'].ge(dataframe['rsi'].shift()) # RSI trending upward

Interpretation:

  1. slowsma > 0: 240-period SMA in uptrend (baseline rising)
  2. close < highsma: Price below 120-period EMA, at relatively low levels
  3. close < lowsma: Price below 60-period EMA, further confirming relatively low position
  4. minusdi > minusdiema: DI- (representing downward momentum) crosses above its 25-period EMA, indicating downward momentum is weakening
  5. rsi >= rsi.shift(): RSI in uptrend, oversold condition improving

3.2 Four Categorized Buy Scenarios

Scenario A: Rebound in Downtrend (ADX > 25)

~dataframe['preparechangetrend'] &    # No trend reversal signal
~dataframe['continueup'] & # Short-term MA not confirmed up
dataframe['adx'].gt(25) & # ADX > 25, some trend strength
dataframe['bigdown'] & # Fast line below slow line (bearish alignment)
dataframe['emarsi'].le(20) # EMA(RSI) <= 20, extremely oversold

Applicable Scenario: Trend is still down, but oversold signal has appeared, preparing for rebound

Scenario B: Rebound in Downtrend (ADX > 30) — Enhanced

~dataframe['preparechangetrend'] &    # No trend reversal signal
dataframe['continueup'] & # Short-term MA confirmed up
dataframe['adx'].gt(30) & # ADX > 30, higher trend strength
dataframe['bigdown'] & # Fast line below slow line
dataframe['emarsi'].le(20) # EMA(RSI) <= 20, extremely oversold

Applicable Scenario: In a downtrend, short-term has already slightly rebounded, but overall still bearish — needs stronger ADX confirmation

Scenario C: Pullback in Uptrend (ADX > 35)

~dataframe['continueup'] &            # Short-term MA not persistently up
dataframe['adx'].gt(35) & # ADX > 35, strong trend
dataframe['bigup'] & # Fast line above slow line (bullish alignment)
dataframe['emarsi'].le(20) # EMA(RSI) <= 20, oversold

Applicable Scenario: In an uptrend, price pulls back to near the moving average, oversold opportunity appears

Scenario D: Minor Pullback in Uptrend (ADX > 30) — Relaxed

dataframe['continueup'] &             # Short-term MA persistently up
dataframe['adx'].gt(30) & # ADX > 30
dataframe['bigup'] & # Bullish alignment
dataframe['emarsi'].le(25) # EMA(RSI) <= 25 (slightly relaxed)

Applicable Scenario: In an uptrend, RSI oversold level slightly lower but trend confirmation stronger


IV. Exit Logic Details

Exit conditions also use a base conditions + categorized scenarios structure.

4.1 Exit Scenario 1: Broke Support

~dataframe['preparechangetrendconfirm'] &  # Trend reversal not confirmed
~dataframe['continueup'] & # Short-term MA not up
(dataframe['close'].gt(dataframe['lowsma']) |
dataframe['close'].gt(dataframe['highsma'])) & # Price rebounded above MAs
dataframe['highsma'].gt(0) & # Fast EMA above zero line
dataframe['bigdown'] # Still bearish alignment

Interpretation: Price has rebounded above the MAs, but trend reversal not confirmed, bearish alignment unchanged

4.2 Exit Scenario 2: Reversal After Breaking High

~dataframe['preparechangetrendconfirm'] &
~dataframe['continueup'] &
dataframe['close'].gt(dataframe['highsma']) & # Broke fast EMA
dataframe['highsma'].gt(0) &
(dataframe['emarsi'].ge(75) |
dataframe['close'].gt(dataframe['slowsma'])) & # RSI overbought or broke slow MA
dataframe['bigdown']

Interpretation: Price broke the high, but RSI already overbought (>=75) or just broke the slow MA — may reverse

4.3 Exit Scenario 3: Strong Reversal Signal in Bullish Trend

~dataframe['preparechangetrendconfirm'] &
dataframe['close'].gt(dataframe['highsma']) &
dataframe['highsma'].gt(0) &
dataframe['adx'].gt(30) &
dataframe['emarsi'].ge(80) & # RSI extremely overbought
dataframe['bigup']

Interpretation: In a bullish trend, RSI exceeds 80 and ADX > 30, momentum may be about to reverse

4.4 Exit Scenario 4: Pullback After Trend Reversal Confirmed

dataframe['preparechangetrendconfirm'] &  # Trend reversal confirmed
~dataframe['continueup'] & # Short-term MA stopped rising
dataframe['slowingdown'] & # Upward momentum slowing
dataframe['emarsi'].ge(75) & # RSI overbought
dataframe['slowsma'].gt(0)

Interpretation: After trend reversal confirmed, short-term upward momentum slowing, RSI already overbought

4.5 Exit Scenario 5: DI Death Cross Confirmed

dataframe['preparechangetrendconfirm'] &
dataframe['minusdi'].lt(dataframe['plusdi']) & # DI- crosses below DI+
dataframe['close'].gt(dataframe['lowsma']) &
dataframe['slowsma'].gt(0)

Interpretation: After trend reversal, DI indicator forms a death cross, confirming downward movement


V. Technical Indicator System

5.1 Core Moving Average Indicators

IndicatorPeriodTypePurpose
lowsma60EMAShort-term price baseline
highsma120EMAMid-term price baseline
fastsma120SMAFast trend line
slowsma240SMASlow trend line
IndicatorPeriodPurpose
rsi5Short-term overbought/oversold
emarsi5RSI's EMA smoothing

5.3 ADX Momentum Indicators

IndicatorPeriodPurpose
adxDefaultTrend strength
minusdiDefaultDownward momentum
minusdiema25Downward momentum trend line
plusdiDefaultUpward momentum
plusdiema5Upward momentum trend line

5.4 Derived Indicators

IndicatorCalculationPurpose
bigupfastsma > slowsma and difference > close/300Confirm bullish alignment
bigdown~bigupConfirm bearish alignment
trendfastsma - slowsmaTrend strength value
preparechangetrendtrend > trend.shift()Trend about to reverse
preparechangetrendconfirmpreparechangetrend AND previous period also metTrend reversal confirmed
continueupslowsma continuously risingShort-term uptrend
deltafastsma - fastsma.shift()Fast line change
slowingdowndelta < delta.shift()Momentum slowing

VI. Risk Management Highlights

6.1 Fixed Stop-Loss

stoploss = -0.10

10% fixed stop-loss provides a hard risk boundary.

6.2 Ultra-High ROI Target

minimal_roi = {"0": 1}

100% ROI means:

  • Strategy has no small profit-taking targets
  • Relies on sell signals or 100% profit to exit
  • May hold positions for a long time waiting for significant rebounds

6.3 RSI Oversold Protection

The emarsi <= 20 or emarsi <= 25 threshold in buy conditions provides additional filtering:

  • Ensures entry at extremely oversold RSI levels
  • Reduces "catching a falling knife" risk

6.4 ADX Trend Strength Filtering

ADX thresholds (25/30/35) ensure:

  • Entry when trend is clear
  • Avoids frequent trading in ranging markets

VII. Strategy Pros & Cons

Strengths

  1. Trend Reversal Capture: Precisely captures trend conversion points through preparechangetrend and preparechangetrendconfirm
  2. Multi-Period Verification: Combines 60/120/240-period MAs to determine market phase
  3. Momentum Confirmation: ADX indicator ensures entry when trend is clear
  4. Strict Oversold: RSI <= 20/25 threshold ensures entry at extreme oversold points
  5. Simple and Direct: No complex custom logic, code is clear and easy to understand

Weaknesses

  1. 100% ROI Target Too Aggressive: Extremely difficult to achieve in most market environments
  2. Holding Time May Be Very Long: Waiting for 100% profit may lead to extended positions
  3. Needs Significant Rebound: Strategy relies on market producing a large-scale reversal to exit
  4. Fixed Stop-Loss Lacks Flexibility: No custom stop-loss logic, passively waiting during losses
  5. Conditions Relatively Strict: May miss some small-to-medium rebound opportunities

VIII. Applicable Scenarios

Market EnvironmentRecommendedNotes
Post-crash ReboundEnable all buy conditionsTypical oversold rebound scenario
Trend ReversalFocus on scenarios C/DUptrend pullback
Intraday Trading5-minute cycleSuitable for short-term operations
Pair SelectionHigh-volatility coinsNeeds significant price swings to reach 100%

IX. Applicable Market Environment Details

9.1 Strategy Core Logic

BinHV27's core logic can be summarized as:

  1. Enter at the inflection point where a trend is about to reverse
  2. Requires RSI extremely oversold (<= 20 or 25)
  3. Requires ADX showing some trend strength
  4. Relies on 100% profit or sell signals to exit

9.2 Performance in Different Market Environments

Market EnvironmentSuitabilityNotes
Post-crash Rebound★★★★★Perfectly matches strategy logic
Trend Reversal Point★★★★☆preparechangetrend captures it
Ranging Market★☆☆☆☆100% target difficult to achieve
Pullback in Uptrend★★★★☆Scenarios C/D suitable
Rebound in Downtrend★★★☆☆Scenarios A/B suitable, but be cautious
Low Volatility Market★☆☆☆☆Insufficient volatility to reach 100%

X. Summary: The Cost of Complexity

10.1 Signal Interpretation Difficulty

Although the code is relatively concise, the logic branches for buy/sell conditions are numerous:

  • 4 buy scenarios, each with different ADX thresholds and MA state requirements
  • 5 sell scenarios, involving different indicator combinations
  • Recommended to fully backtest before live trading and understand each scenario's triggering conditions

10.2 The Cost of 100% ROI

  • In most market environments, 100% profit is extremely rare
  • May lead to positions lasting weeks or even months
  • If market continues to fall, the 10% stop-loss will frequently trigger
  • Recommended to adjust ROI parameters based on actual market conditions

10.3 Backtesting Notes

  1. Slippage: Uses market orders, needs to consider slippage impact
  2. Liquidity: Small-cap coins may not accommodate large capital
  3. Timeframe: 5-minute requires sufficient historical data
  4. Tail Risk: Extreme market conditions may produce losses far exceeding 10%

XI. Risk Reminder

BinHV27 is a uniquely designed quantitative trading strategy with clear objectives. Its core characteristics are:

  1. Extreme Oversold: RSI <= 20/25 threshold ensures entry at extreme oversold points
  2. Trend Reversal Capture: Uses preparechangetrend series indicators to identify trend conversion points
  3. Momentum Confirmation: ADX indicator filters ranging markets, ensuring trend is clear
  4. Ultra-High Take-Profit: 100% ROI means pursuing large-scale reversals
  5. Concise Code: No complex custom logic, easy to understand and modify

Risk Warning:

  • The 100% initial take-profit target is extremely difficult to achieve in most market environments
  • May lead to long holding periods, testing trader patience
  • The 10% fixed stop-loss may be insufficient in extreme market conditions
  • Recommended to adjust ROI parameters to lower targets (20–50%) based on personal risk tolerance

This strategy is suitable for:

  • Traders with high risk tolerance
  • Investors who can hold positions for extended periods waiting for significant rebounds
  • Quantitative traders pursuing high returns and willing to accept high volatility

This document is written based on the BinHV27 strategy code and is for learning and reference only. It does not constitute investment advice.