ADX_15M_USDT2 Strategy In-Depth Analysis
Strategy Number: #413 (413th of 465 strategies)
Strategy Type: Trend Reversal + DI Crossover
Timeframe: 15 Minutes (15m)
I. Strategy Overview
ADX_15M_USDT2 is a minimalist trend strategy based on ADX (Average Directional Index) and DI (Directional Indicator) crossovers. The strategy captures trend reversal opportunities by detecting crossover signals between MINUS_DI and PLUS_DI. The core logic is extremely concise, embodying a "less is more" design philosophy.
Core Features
| Feature | Description |
|---|---|
| Buy Condition | 1 core buy signal (DI crossover) |
| Sell Condition | 1 basic sell signal (DI reverse crossover + extreme ADX values) |
| Protection Mechanism | Fixed stop-loss + ROI tiered take-profit |
| Timeframe | 15 Minutes (15m) |
| Dependencies | talib, qtpylib |
II. Strategy Configuration Analysis
2.1 Basic Risk Parameters
# ROI exit table
minimal_roi = {
"0": 0.10313, # Exit immediately at 10.313% profit
"102": 0.07627, # Exit at 7.627% after 102 minutes
"275": 0.04228, # Exit at 4.228% after 275 minutes
"588": 0 # Accept any profit after 588 minutes
}
# Stop-loss setting
stoploss = -0.31941 # -31.941% stop-loss
Design Rationale:
- Aggressive take-profit: Demands 10%+ profit from the start, reflecting pursuit of quick swing gains
- Time decay: Longer holding periods reduce profit requirements, avoiding profit giveback
- Wide stop-loss: 31.9% stop-loss provides sufficient tolerance for trend fluctuations
2.2 Order Type Configuration
The strategy does not customize order_types, using default configuration.
III. Buy Condition Details
3.1 Core Buy Logic
def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe.loc[
(
(qtpylib.crossed_above(dataframe['minus_di'], dataframe['plus_di']))
),
'buy'] = 1
return dataframe
Single Buy Condition: MINUS_DI crosses above PLUS_DI
| Condition Element | Parameter | Description |
|---|---|---|
| MINUS_DI | 25 periods | Negative directional indicator, represents downward momentum |
| PLUS_DI | 25 periods | Positive directional indicator, represents upward momentum |
| Crossover Signal | crossed_above | MINUS_DI breaks above PLUS_DI |
3.2 Commented Out Filter Conditions
There are commented-out filter conditions in the code:
# (dataframe['adx'] > 45) &
# (dataframe['minus_di'] > 26) &
# (dataframe['plus_di'] > 33) &
If enabled, these conditions would filter:
- ADX > 45: Strong trend confirmation
- MINUS_DI > 26: Significant downward momentum
- PLUS_DI > 33: Simultaneous upward momentum (potential oscillation)
3.2 Strategy Intent Interpretation
MINUS_DI crossing above PLUS_DI typically means downward momentum is beginning to dominate, which in traditional interpretation is a short signal. However, this strategy uses it as a buy signal, possibly due to:
- Contrarian operation: Catching oversold bounces
- Bottom-fishing strategy: Entering positions at the start of downward momentum
- Design oversight: Possibly a test version or incomplete version
IV. Sell Logic Details
4.1 Sell Conditions
def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe.loc[
(
(dataframe['adx'] > 91) &
(dataframe['sell-minus_di'] > 91) &
(qtpylib.crossed_above(dataframe['sell-plus_di'], dataframe['sell-minus_di']))
),
'sell'] = 1
return dataframe
Triple Filter Sell Signal:
| Condition | Parameter Value | Description |
|---|---|---|
| ADX > 91 | Extreme value | Trend strength reaches extreme |
| MINUS_DI > 91 | Extreme value | Downward momentum reaches extreme |
| PLUS_DI crosses above MINUS_DI | Crossover | Upward momentum begins to overtake |
4.2 Sell Condition Analysis
Meaning of Extreme Threshold 91:
- ADX and DI indicators typically fluctuate within 0-100 range
- 91 is a very extreme value, rarely occurring
- This means the sell signal triggers extremely infrequently
Practical Effect: The strategy primarily relies on the ROI table and stop-loss for exits; technical sell signals will almost never trigger.
V. Technical Indicator System
5.1 Core Indicators
| Indicator Category | Specific Indicator | Parameters | Purpose |
|---|---|---|---|
| Trend Strength | ADX | 14 periods | Measures trend strength (non-directional) |
| Directional Indicator | PLUS_DI | 25 periods | Positive direction momentum |
| Directional Indicator | MINUS_DI | 25 periods | Negative direction momentum |
| Trend Following | SAR | Default | Parabolic Stop and Reverse (unused) |
| Momentum Indicator | MOM | 14 periods | Momentum oscillator (unused) |
5.2 Indicator Calculation
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe['adx'] = ta.ADX(dataframe, timeperiod=14)
dataframe['plus_di'] = ta.PLUS_DI(dataframe, timeperiod=25)
dataframe['minus_di'] = ta.MINUS_DI(dataframe, timeperiod=25)
dataframe['sar'] = ta.SAR(dataframe)
dataframe['mom'] = ta.MOM(dataframe, timeperiod=14)
# Sell indicators (calculated independently)
dataframe['sell-adx'] = ta.ADX(dataframe, timeperiod=14)
dataframe['sell-plus_di'] = ta.PLUS_DI(dataframe, timeperiod=25)
dataframe['sell-minus_di'] = ta.MINUS_DI(dataframe, timeperiod=25)
dataframe['sell-sar'] = ta.SAR(dataframe)
dataframe['sell-mom'] = ta.MOM(dataframe, timeperiod=14)
return dataframe
Note: The strategy calculates SAR and MOM indicators but does not use them in buy/sell conditions, possibly reserved for future extension interfaces.
VI. Risk Management Features
6.1 Tiered Take-Profit Mechanism
| Holding Time | Take-Profit Threshold | Description |
|---|---|---|
| 0 minutes | 10.31% | Demands high returns from entry |
| 102 minutes | 7.63% | Reduces requirements after ~1.7 hours |
| 275 minutes | 4.23% | Further reduces after ~4.6 hours |
| 588 minutes | 0% | Exits unconditionally after ~9.8 hours |
6.2 Fixed Stop-Loss
- Stop-Loss Value: -31.941%
- Characteristics: Relatively loose compared to aggressive take-profit
- Risk: May incur significant drawdown
6.3 No Trailing Stop
The strategy does not enable trailing_stop, relying on fixed stop-loss and ROI exits.
VII. Strategy Advantages and Limitations
✅ Advantages
- Simple Logic: Single buy signal, easy to understand and debug
- Lightweight Code: About 60 lines of code, high execution efficiency
- Low Computational Overhead: Uses only basic technical indicators, low hardware requirements
⚠️ Limitations
- Signal Direction Questionable: MINUS_DI crossing above PLUS_DI is traditionally a short signal
- Sell Signal Extremely Difficult to Trigger: ADX/DI > 91 thresholds are almost impossible to reach
- Lack of Filter Conditions: Buy signal too simple, may generate many false signals
- Stop-Loss Too Wide: 31.9% stop-loss may lead to significant losses
- Unused Indicators: SAR and MOM calculated but not used, creating redundancy
VIII. Applicable Scenario Recommendations
| Market Environment | Recommended Configuration | Description |
|---|---|---|
| Volatile Market | Enable ADX Filter | Uncomment ADX > 45 condition |
| Trending Market | Adjust Take-Profit | Lower initial ROI threshold |
| High Risk Tolerance | Current Configuration | Maintain original parameters |
| Conservative Trading | Tighten Stop-Loss | Adjust stop-loss to -10%~-15% |
IX. Applicable Market Environment Details
ADX_15M_USDT2 is a minimalist signal strategy. Based on its code architecture, it is best suited for high-volatility reversal markets, while performing poorly in trend continuation markets.
9.1 Strategy Core Logic
- Reversal Capture: Captures trend reversal points through DI crossovers
- Extreme Exit: Judges trend termination through extreme ADX values
- Time Decay: Controls holding duration through ROI table
9.2 Performance in Different Market Environments
| Market Type | Performance Rating | Analysis |
|---|---|---|
| 📈 Strong Trend | ⭐⭐☆☆☆ | DI crossover may trigger premature reversal entry |
| 🔄 Oscillating Reversal | ⭐⭐⭐⭐☆ | Matches strategy reversal capture logic |
| 📉 Plunging Market | ⭐⭐☆☆☆ | Buy signal direction may be opposite |
| ⚡️ High Volatility | ⭐⭐⭐☆☆ | Frequent signals, requires filtering |
9.3 Key Configuration Recommendations
| Configuration Item | Recommended Value | Description |
|---|---|---|
| Stop-Loss | -15% | Reduce maximum loss |
| ADX Filter | Enable | Uncomment conditions |
| Timeframe | 15m/1h | Avoid lower timeframe noise |
X. Important Note: The Cost of Complexity
10.1 Learning Cost
The strategy code is extremely simple with low learning cost, but understanding DI crossover trading logic requires technical analysis foundation.
10.2 Hardware Requirements
| Number of Trading Pairs | Minimum Memory | Recommended Memory |
|---|---|---|
| 1-10 pairs | 512MB | 1GB |
| 10-50 pairs | 1GB | 2GB |
| 50+ pairs | 2GB | 4GB |
10.3 Differences Between Backtesting and Live Trading
- Backtesting: May hold positions for long periods due to rare sell signals
- Live Trading: Need to monitor if stop-loss is too loose
10.4 Manual Trading Recommendations
Strategy core can be executed manually:
- Observe DI indicators on 15-minute charts
- Consider entering when MINUS_DI crosses above PLUS_DI
- Set 10% take-profit or time-based stop
XI. Conclusion
ADX_15M_USDT2 is a minimalist reversal strategy prototype. Its core value lies in:
- Simple and Understandable: Single signal, transparent code
- Extension Space: Reserved interfaces for ADX, SAR, MOM indicators
- Prototype Value: Can serve as a starting point for DI crossover strategies
For quantitative traders, it is recommended to enable commented conditions and adjust signal direction before committing to live testing.