Skip to main content

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

CharacteristicDescription
Buy Conditions8 independent buy signal sets, each independently enableable/disableable
Sell Conditions6 base sell signals + multi-layer dynamic take-profit logic
Protection8 sets of buy protection parameters (EMA/SMA/safe-dip/safe-pump)
Timeframe15-minute primary timeframe + 1-hour informational timeframe
DependenciesTA-Lib, technical, qtpylib, pandas, numpy

1.1 Strategy Design Philosophy

MediusV2's core design philosophy can be summarized as "seeking balance in the middle":

  1. Midprice Analysis: Uses (High + Low) / 2 as key price reference
  2. Multi-Condition Balance: Seeks equilibrium between aggressive and conservative
  3. 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 ItemRecommended ValueDescription
Max Open Trades4–6Balances risk and opportunity capture
Number of Pairs40–80Recommend using volume-sorted pair list
Quote CurrencyUSDT/BUSDAvoid BTC/ETH quote
BlacklistLeveraged tokensExclude *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 TypeParameter DescriptionDefault ExampleRole
EMA FastFast EMA position checkema_fast_len=26Short-term trend confirmation
EMA SlowSlow EMA position checkema_slow_len=100Long-term trend confirmation
Close Price ProtectionClose above fast EMAclose_above_ema_fast_len=200Avoid counter-trend buying
SMA200 RisingSMA200 upward trendsma200_rising_val=28Trend strength confirmation
Safe DipDownward amplitude thresholdsafe_dips_type=80Prevent chasing dips
Safe PumpUpward amplitude thresholdsafe_pump_type=70Prevent chasing highs
BTC TrendBTC 1h non-downtrendbtc_1h_not_downtrendOverall market direction

3.2 Typical Buy Condition Examples

Condition #1: RSI Oversold + MFI Low + Trend Confirmation

# Logic
- RSI(1h) between 3080 (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 GroupCondition NumbersCore LogicApplicable Scenario
Oversold Bounce1, 2RSI/MFI low values + oversold signalsAfter market panic selloff
Bollinger Strategy2, 5, 6Price breaks Bollinger lower bandAfter volatility expansion reversion
EMA Trend3, 4, 7EMA golden cross + price positionEarly trend initiation
Momentum Reversal8EWO/momentum indicator reversalTrend 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

ScenarioTrigger ConditionSignal NameDescription
EMA200 Below ExitPrice < EMA200 + profit threshold metsignal_profit_u_*Accelerate exit when trend weakens
Pump Protection24h/48h pump detection + profitsignal_profit_p_*Prevent sharp dump after pump
DowntrendSMA200 declining + profit rangesignal_profit_d_*Fast exit when trend deteriorates
Trailing Take-ProfitMax profit drawdown + RSI rangesignal_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 CategorySpecific IndicatorsPurpose
Trend IndicatorsEMA(12, 20, 26, 50, 100, 200)Trend judgment, protection mechanisms
Momentum IndicatorsRSI(4, 14, 20), MFI, EWOOverbought/oversold, momentum strength
Volatility IndicatorsBB(20, 40), ATRVolatility judgment, position confirmation
Volume IndicatorsVolume MA, OBVVolume confirmation
Midprice Indicators(High+Low)/2, MP_EMAEquilibrium 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 LayerParameterRole
Hard Stoploss-10%Control max loss per trade
Trailing Stoploss5% activate, 4% drawdownLock in profits
ROI Take-ProfitTime-decreasingEnsure profit-taking
Signal StoplossTrend reversal signalsProactive 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

  1. Multi-Condition Confirmation: 8 buy signal sets, high signal quality, low false breakout rate
  2. V2 Optimization: Version 2 improved from original, more reasonable parameters
  3. Midprice Analysis: Unique midprice system reduces noise from high/low points
  4. Multi-Layer Protection: Buy protection + stoploss protection + trailing stop, triple insurance
  5. 15-Minute Timeframe: More stable than 5-minute, more reliable signals than 1-hour
  6. Medium Take-Profit Target: 10% initial target, suitable for trending markets

Cons

  1. Sparse Signals: Multi-condition simultaneously satisfied is difficult, may miss some opportunities
  2. High Complexity: 8 protection parameter sets, high optimization difficulty
  3. Parameter Sensitivity: Needs adjustment for different market environments
  4. Overfitting Risk: Complex strategies may overfit historical data
  5. Lag: Multi-confirmation increases signal lag
  6. Capital Requirements: Recommends running 4–6 concurrent positions, needs sufficient capital

VIII. Applicable Scenarios

Market EnvironmentRecommended ConfigDescription
UptrendEnable all conditionsCapture pullback entry opportunities in uptrends
DowntrendEnable only oversold bounceCautious operation, only light positions on oversold
Ranging MarketReduce position countLower expectations, control risk
High VolatilityWiden stoploss to -15%Give more volatility room
Low VolatilityTighten 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 TypePerformance RatingAnalysis
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 ItemRecommended ValueDescription
Trading Pair SelectionMainstream tokens + high-volume altsAvoid low-liquidity tokens
Capital Allocation15–20% per tradeReserve room for volatility
Enable ConditionsRecommend enabling allMulti-conditions complement each other
Take-Profit AdjustmentDynamically adjust per volatilityRaise targets in high volatility

X. Summary

MediusV2 is a well-designed multi-condition trend-following strategy. Its core value lies in:

  1. Balanced Design: Finds balance between aggressive and conservative
  2. Midprice Analysis: Unique price reference system reduces noise interference
  3. Multi-Layer Protection: Triple stoploss mechanism protects capital safety
  4. 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.