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
preparechangetrendandpreparechangetrendconfirmto 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
| Attribute | Description |
|---|---|
| Buy Conditions | 4 scenarios based on trend phase and ADX strength |
| Sell Conditions | 5 scenarios covering trend reversal confirmation and RSI overbought |
| Protection Mechanisms | RSI oversold thresholds (20/25), ADX strength thresholds (25/30/35) |
| Timeframe | 5 minutes |
| Stop-Loss Method | Fixed stop-loss -10% |
| Take-Profit Method | Exits only when 100% profit is achieved (minimal_roi = {"0": 1}) |
| Suitable Market | Strong 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:
- slowsma > 0: 240-period SMA in uptrend (baseline rising)
- close < highsma: Price below 120-period EMA, at relatively low levels
- close < lowsma: Price below 60-period EMA, further confirming relatively low position
- minusdi > minusdiema: DI- (representing downward momentum) crosses above its 25-period EMA, indicating downward momentum is weakening
- 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
| Indicator | Period | Type | Purpose |
|---|---|---|---|
| lowsma | 60 | EMA | Short-term price baseline |
| highsma | 120 | EMA | Mid-term price baseline |
| fastsma | 120 | SMA | Fast trend line |
| slowsma | 240 | SMA | Slow trend line |
5.2 RSI-Related Indicators
| Indicator | Period | Purpose |
|---|---|---|
| rsi | 5 | Short-term overbought/oversold |
| emarsi | 5 | RSI's EMA smoothing |
5.3 ADX Momentum Indicators
| Indicator | Period | Purpose |
|---|---|---|
| adx | Default | Trend strength |
| minusdi | Default | Downward momentum |
| minusdiema | 25 | Downward momentum trend line |
| plusdi | Default | Upward momentum |
| plusdiema | 5 | Upward momentum trend line |
5.4 Derived Indicators
| Indicator | Calculation | Purpose |
|---|---|---|
| bigup | fastsma > slowsma and difference > close/300 | Confirm bullish alignment |
| bigdown | ~bigup | Confirm bearish alignment |
| trend | fastsma - slowsma | Trend strength value |
| preparechangetrend | trend > trend.shift() | Trend about to reverse |
| preparechangetrendconfirm | preparechangetrend AND previous period also met | Trend reversal confirmed |
| continueup | slowsma continuously rising | Short-term uptrend |
| delta | fastsma - fastsma.shift() | Fast line change |
| slowingdown | delta < 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
- Trend Reversal Capture: Precisely captures trend conversion points through
preparechangetrendandpreparechangetrendconfirm - Multi-Period Verification: Combines 60/120/240-period MAs to determine market phase
- Momentum Confirmation: ADX indicator ensures entry when trend is clear
- Strict Oversold: RSI <= 20/25 threshold ensures entry at extreme oversold points
- Simple and Direct: No complex custom logic, code is clear and easy to understand
Weaknesses
- 100% ROI Target Too Aggressive: Extremely difficult to achieve in most market environments
- Holding Time May Be Very Long: Waiting for 100% profit may lead to extended positions
- Needs Significant Rebound: Strategy relies on market producing a large-scale reversal to exit
- Fixed Stop-Loss Lacks Flexibility: No custom stop-loss logic, passively waiting during losses
- Conditions Relatively Strict: May miss some small-to-medium rebound opportunities
VIII. Applicable Scenarios
| Market Environment | Recommended | Notes |
|---|---|---|
| Post-crash Rebound | Enable all buy conditions | Typical oversold rebound scenario |
| Trend Reversal | Focus on scenarios C/D | Uptrend pullback |
| Intraday Trading | 5-minute cycle | Suitable for short-term operations |
| Pair Selection | High-volatility coins | Needs significant price swings to reach 100% |
IX. Applicable Market Environment Details
9.1 Strategy Core Logic
BinHV27's core logic can be summarized as:
- Enter at the inflection point where a trend is about to reverse
- Requires RSI extremely oversold (<= 20 or 25)
- Requires ADX showing some trend strength
- Relies on 100% profit or sell signals to exit
9.2 Performance in Different Market Environments
| Market Environment | Suitability | Notes |
|---|---|---|
| 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
- Slippage: Uses market orders, needs to consider slippage impact
- Liquidity: Small-cap coins may not accommodate large capital
- Timeframe: 5-minute requires sufficient historical data
- 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:
- Extreme Oversold: RSI <= 20/25 threshold ensures entry at extreme oversold points
- Trend Reversal Capture: Uses preparechangetrend series indicators to identify trend conversion points
- Momentum Confirmation: ADX indicator filters ranging markets, ensuring trend is clear
- Ultra-High Take-Profit: 100% ROI means pursuing large-scale reversals
- 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.