MediusV2 Strategy Analysis
Strategy ID: #235 (Strategy #235 of 465)
Strategy Type: Multi-Condition Trend Following + Midprice Analysis (Version 2)
Timeframe: 15 Minutes (15m)
I. Strategy Overview
MediusV2 is the second version of the Medius strategy series. "Medius" means "middle" in Latin. This naming reveals the strategy's core design philosophy — capturing market trend turning points and continuation opportunities through midprice, median, or equilibrium analysis.
As the second version, MediusV2 underwent deep optimization from the original: refined entry conditions, enhanced protection mechanisms, and more rational risk parameters. The strategy uses a 15-minute timeframe, suitable for medium-short-term trend trading, and performs especially well in volatile cryptocurrency markets.
Core Characteristics
| Characteristic | Description |
|---|---|
| Buy Conditions | 8 independent buy signal sets, each independently enableable/disableable |
| Sell Conditions | 6 base sell signals + multi-layer dynamic take-profit logic |
| Protection | 8 sets of buy protection parameters (EMA/SMA/safe-dip/safe-pump) |
| Timeframe | 15-minute primary timeframe + 1-hour informational timeframe |
| Dependencies | TA-Lib, technical, qtpylib, pandas, numpy |
1.1 Strategy Design Philosophy
MediusV2's core design philosophy can be summarized as "seeking balance in the middle":
- Midprice Analysis: Uses (High + Low) / 2 as key price reference
- Multi-Condition Balance: Seeks equilibrium between aggressive and conservative
- Risk-Return Balance: Balances profit pursuit and risk control through multi-layer protection
II. Strategy Configuration Analysis
2.1 Basic Risk Parameters
# ROI Exit Table
minimal_roi = {
"0": 0.10, # Immediate exit: 10% profit
"30": 0.07, # After 30 minutes: 7% profit
"60": 0.04, # After 60 minutes: 4% profit
"120": 0.02 # After 120 minutes: 2% profit
}
# Stoploss Settings
stoploss = -0.10 # -10% hard stoploss
# Trailing Stop
trailing_stop = True
trailing_only_offset_is_reached = True
trailing_stop_positive = 0.04 # 4% trailing start
trailing_stop_positive_offset = 0.05 # 5% offset trigger
Design Philosophy:
- Time-Decreasing ROI: Longer holding = lower profit threshold, encouraging short-term profit-taking
- Medium Stoploss: -10% provides sufficient volatility room in crypto markets
- Trailing Stop Protection: Activates after 5% profit to lock in gains
2.2 Order Type Configuration
order_types = {
'buy': 'limit', # Limit order entry, reduces slippage cost
'sell': 'limit', # Limit order exit
'trailing_stop_loss': 'limit',
'stoploss': 'limit', # Limit stoploss order
'stoploss_on_exchange': False
}
2.3 Trading Configuration Recommendations
| Config Item | Recommended Value | Description |
|---|---|---|
| Max Open Trades | 4–6 | Balances risk and opportunity capture |
| Number of Pairs | 40–80 | Recommend using volume-sorted pair list |
| Quote Currency | USDT/BUSD | Avoid BTC/ETH quote |
| Blacklist | Leveraged tokens | Exclude *BULL, *BEAR, etc. |
III. Entry Conditions Details
3.1 Protection Mechanisms (8 Sets)
Each buy condition has an independent protection parameter set, forming a multi-layer safety net:
| Protection Type | Parameter Description | Default Example | Role |
|---|---|---|---|
| EMA Fast | Fast EMA position check | ema_fast_len=26 | Short-term trend confirmation |
| EMA Slow | Slow EMA position check | ema_slow_len=100 | Long-term trend confirmation |
| Close Price Protection | Close above fast EMA | close_above_ema_fast_len=200 | Avoid counter-trend buying |
| SMA200 Rising | SMA200 upward trend | sma200_rising_val=28 | Trend strength confirmation |
| Safe Dip | Downward amplitude threshold | safe_dips_type=80 | Prevent chasing dips |
| Safe Pump | Upward amplitude threshold | safe_pump_type=70 | Prevent chasing highs |
| BTC Trend | BTC 1h non-downtrend | btc_1h_not_downtrend | Overall market direction |
3.2 Typical Buy Condition Examples
Condition #1: RSI Oversold + MFI Low + Trend Confirmation
# Logic
- RSI(1h) between 30–80 (1-hour trend normal)
- RSI(14) < 35 (14-period RSI oversold)
- MFI < 45 (Money Flow Indicator low, indicates capital outflow)
- Close has minimum gain from 30-period low
- SMA200 in upward trend
- EMA100 above EMA200
Condition #2: Bollinger Lower Band Break + EMA Golden Cross
# Logic
- Close < Bollinger lower band × 0.985 (deep break below lower band)
- EMA26 > EMA12 (short-term golden cross)
- EMA difference > open × 0.02 (golden cross strength confirmation)
- RSI < 40 (配合 oversold state)
- Dip within safe range
Condition #3: Midprice Support Confirmation
# Logic
- Close > midprice EMA20 (price above midprice moving average)
- RSI bouncing from oversold zone (RSI > 30 and RSI_prev < 30)
- Volume expansion (volume > volume_ma × 1.5)
- 1-hour trend upward
Condition #4: EWO Momentum Reversal
# Logic
- EWO (Elliott Wave Oscillator) turning from negative to positive or near zero axis
- Close > SMA200 (long-term trend upward)
- RSI < 50 (room to rise)
- Moderate volatility (ATR in reasonable range)
3.3 8 Buy Conditions Classified
| Condition Group | Condition Numbers | Core Logic | Applicable Scenario |
|---|---|---|---|
| Oversold Bounce | 1, 2 | RSI/MFI low values + oversold signals | After market panic selloff |
| Bollinger Strategy | 2, 5, 6 | Price breaks Bollinger lower band | After volatility expansion reversion |
| EMA Trend | 3, 4, 7 | EMA golden cross + price position | Early trend initiation |
| Momentum Reversal | 8 | EWO/momentum indicator reversal | Trend turning points |
IV. Exit Conditions Details
4.1 Multi-Layer Take-Profit System
The strategy uses a tiered dynamic take-profit mechanism, dynamically adjusting exit conditions based on profit rate:
Profit Range RSI Threshold Signal Name
────────────────────────────────────────────────────────
> 18% < 36 signal_profit_8
14%–18% < 42 signal_profit_7
10%–14% < 50 signal_profit_6
8%–10% < 52 signal_profit_5
6%–8% < 48 signal_profit_4
5%–6% < 44 signal_profit_3
4%–5% < 40 signal_profit_2
3%–4% < 38 signal_profit_1
2%–3% < 35 signal_profit_0
Design Logic:
- Higher profit rate = lower RSI trigger threshold = easier to lock in profits
- In high-profit zones, even modest RSI pullback triggers sell
4.2 Special Exit Scenarios
| Scenario | Trigger Condition | Signal Name | Description |
|---|---|---|---|
| EMA200 Below Exit | Price < EMA200 + profit threshold met | signal_profit_u_* | Accelerate exit when trend weakens |
| Pump Protection | 24h/48h pump detection + profit | signal_profit_p_* | Prevent sharp dump after pump |
| Downtrend | SMA200 declining + profit range | signal_profit_d_* | Fast exit when trend deteriorates |
| Trailing Take-Profit | Max profit drawdown + RSI range | signal_profit_t_* | Exit on profit lock during pullback |
4.3 Base Sell Signals (6)
# Sell Signal 1: Bollinger Upper Band Continuous Break
- RSI > 78
- Close > BB20 upper band (3+ consecutive candles)
- Indicates severe short-term overbought
# Sell Signal 2: Short-Term Overbought
- RSI > 80
- Close > BB20 upper band (2 consecutive candles)
- Fast overbought signal
# Sell Signal 3: Dual RSI Overbought
- RSI(14) > 72
- RSI(1h) > 78
- Multi-timeframe overbought confirmation
# Sell Signal 4: EMA Below Overbought
- Close < EMA200
- Close > EMA50
- RSI > 76
- Trend weakening but not fully broken
# Sell Signal 5: 1h RSI Extreme + EMA Death Cross
- RSI(1h) > 80
- EMA12 crosses below EMA26
- Trend reversal signal
# Sell Signal 6: Midprice Support Break
- Close < midprice EMA20
- RSI > 65 (sell when position elevated)
- Price breaks key support level
V. Technical Indicator System
5.1 Core Indicators
| Indicator Category | Specific Indicators | Purpose |
|---|---|---|
| Trend Indicators | EMA(12, 20, 26, 50, 100, 200) | Trend judgment, protection mechanisms |
| Momentum Indicators | RSI(4, 14, 20), MFI, EWO | Overbought/oversold, momentum strength |
| Volatility Indicators | BB(20, 40), ATR | Volatility judgment, position confirmation |
| Volume Indicators | Volume MA, OBV | Volume confirmation |
| Midprice Indicators | (High+Low)/2, MP_EMA | Equilibrium analysis |
5.2 Informational Timeframe Indicators (1h)
The strategy uses 1 hour as an informational layer, providing higher-dimensional trend judgment:
- RSI(1h): Confirm major-cycle overbought/oversold state
- EMA(1h): Judge major-cycle trend direction
- SMA200(1h): Long-term trend confirmation
- BTC 1h Trend: Overall market direction indicator
5.3 Midprice Analysis System
# Midprice calculation
midprice = (dataframe['high'] + dataframe['low']) / 2
# Midprice EMA
mp_ema_20 = ta.EMA(midprice, timeperiod=20)
mp_ema_50 = ta.EMA(midprice, timeperiod=50)
# Close price relative to midprice position
close_to_mp_ratio = dataframe['close'] / midprice
VI. Risk Management Highlights
6.1 Multi-Layer Stoploss Protection
| Protection Layer | Parameter | Role |
|---|---|---|
| Hard Stoploss | -10% | Control max loss per trade |
| Trailing Stoploss | 5% activate, 4% drawdown | Lock in profits |
| ROI Take-Profit | Time-decreasing | Ensure profit-taking |
| Signal Stoploss | Trend reversal signals | Proactive exit |
6.2 Buy Protection Mechanisms
# Safe dip protection
if (close - low_100) / low_100 < safe_dips_threshold:
allow_buy = False # Too much decline, possible systemic risk
# Safe pump protection
if (high_24 - close) / close < safe_pump_threshold:
allow_buy = False # Recent gain too large, prevent chasing
# BTC trend protection
if btc_1h_trend == 'downtrend':
allow_buy = False # Overall market declining, stand by
6.3 Time Control
- Max Holding: Approximately 120 minutes (per ROI table)
- Signal Waiting: process_only_new_candles = True, process only new candles
- Startup Period: startup_candle_count = 200, needs sufficient historical data
VII. Strategy Pros & Cons
Pros
- Multi-Condition Confirmation: 8 buy signal sets, high signal quality, low false breakout rate
- V2 Optimization: Version 2 improved from original, more reasonable parameters
- Midprice Analysis: Unique midprice system reduces noise from high/low points
- Multi-Layer Protection: Buy protection + stoploss protection + trailing stop, triple insurance
- 15-Minute Timeframe: More stable than 5-minute, more reliable signals than 1-hour
- Medium Take-Profit Target: 10% initial target, suitable for trending markets
Cons
- Sparse Signals: Multi-condition simultaneously satisfied is difficult, may miss some opportunities
- High Complexity: 8 protection parameter sets, high optimization difficulty
- Parameter Sensitivity: Needs adjustment for different market environments
- Overfitting Risk: Complex strategies may overfit historical data
- Lag: Multi-confirmation increases signal lag
- Capital Requirements: Recommends running 4–6 concurrent positions, needs sufficient capital
VIII. Applicable Scenarios
| Market Environment | Recommended Config | Description |
|---|---|---|
| Uptrend | Enable all conditions | Capture pullback entry opportunities in uptrends |
| Downtrend | Enable only oversold bounce | Cautious operation, only light positions on oversold |
| Ranging Market | Reduce position count | Lower expectations, control risk |
| High Volatility | Widen stoploss to -15% | Give more volatility room |
| Low Volatility | Tighten take-profit to 8% | Quick profit-taking |
IX. Applicable Market Environment Details
MediusV2 is a balanced trend strategy. Based on its code architecture and design philosophy, it is best suited for medium-volatility trending markets, and may underperform in extreme conditions.
9.1 Strategy Core Logic
- Midprice-Oriented: Uses midprice as key reference, reduces high/low noise
- Multi-Condition Filtering: Filters high-quality signals through multiple conditions
- Trend Confirmation Priority: EMA/SMA trend confirmation is prerequisite for buying
- Dynamic Take-Profit: Adjusts exit strategy based on profit rate
9.2 Performance Across Market Environments
| Market Type | Performance Rating | Analysis |
|---|---|---|
| Slow Bull Trend | ⭐⭐⭐⭐⭐ | Strategy buys on pullbacks in trends, rides the move with the trend, highest efficiency |
| Range Consolidation | ⭐⭐⭐☆☆ | Fewer signals, may get stopped out at range edges |
| Trend Decline | ⭐⭐☆☆☆ | Even oversold signals triggered, may just be mid-fall bounce |
| Extreme Volatility | ⭐⭐☆☆☆ | Stoploss may trigger frequently, large slippage losses |
| Fast Pump/Dump | ⭐⭐⭐☆☆ | Midprice system has reduced reference value in extreme moves |
9.3 Key Configuration Recommendations
| Config Item | Recommended Value | Description |
|---|---|---|
| Trading Pair Selection | Mainstream tokens + high-volume alts | Avoid low-liquidity tokens |
| Capital Allocation | 15–20% per trade | Reserve room for volatility |
| Enable Conditions | Recommend enabling all | Multi-conditions complement each other |
| Take-Profit Adjustment | Dynamically adjust per volatility | Raise targets in high volatility |
X. Summary
MediusV2 is a well-designed multi-condition trend-following strategy. Its core value lies in:
- Balanced Design: Finds balance between aggressive and conservative
- Midprice Analysis: Unique price reference system reduces noise interference
- Multi-Layer Protection: Triple stoploss mechanism protects capital safety
- Version Iteration: V2 optimized from original, more mature
Recommendations for quantitative traders:
- Fully backtest to verify parameter effectiveness
- Start with small capital for live verification
- Regularly review and adjust parameters
Remember: Even the best strategy needs good capital management and mindset control. Strategy is a tool; the user ultimately determines final returns.