Skip to main content

EMABreakout Strategy: In-Depth Analysis

Strategy Number: #156 (156th of 465 strategies)
Strategy Type: EMA Crossover
Timeframe: 5 Minutes (5m)


I. Strategy Overview​

EMABreakout is similar to EMA50, also an MA crossover strategy. The difference is it uses a parameterized EMA period (20-100 adjustable) and optionally enables MACD confirmation.

Key Characteristics​

FeatureDescription
Buy Conditions1: Price crosses above EMA
Sell Conditions1: Price crosses below EMA (or HOLD)
Timeframe5 Minutes
DependenciesTA-Lib, technical

II. Strategy Configuration​

minimal_roi = {
"0": 0.278, "39": 0.087, "124": 0.038, "135": 0
}

stoploss = -0.333

trailing_stop = True
trailing_stop_positive = 0.172
trailing_stop_positive_offset = 0.212

III. Entry Conditions​

conditions.append(dataframe["volume"] > 0)
if self.buy_macd_enabled.value:
conditions.append(dataframe["macdhist"] >= 0)
conditions.append(qtpylib.crossed_above(dataframe["close"], dataframe["ema"]))

Logic: Volume > 0 + (optional) MACD positive + Price crosses above EMA


IV. Exit Conditions​

HOLD mode does not sell by default, or can be configured to sell when price crosses below EMA.


V. Technical Indicators​

IndicatorPurpose
EMAParameterized period 20-100
SMASame-period simple moving average
SARParabolic SAR
MACDMomentum confirmation
RSIOverbought/oversold

VI. Risk Management Features​

6.1 Protection Mechanism​

The strategy has no independent protection parameters, relying primarily on:

  • Generous hard stoploss (-33.3%)
  • Trailing stop (activates at 17.2%)
  • Optional MACD confirmation

6.2 Parameter Tuning​

ParameterDescription
ema_periodEMA period (20-100 adjustable)
buy_macd_enabledWhether to enable MACD confirmation

VII. Strategy Pros & Cons​

✅ Pros​

  1. Parameter adjustable: EMA period can be adjusted based on market
  2. Clear signals: No ambiguity, no second-guessing
  3. MACD confirmation (optional): Reduces false signals
  4. Compatible with EMA50: Can directly use EMA50 parameters

⚠️ Cons​

  1. No protection mechanism: Gets whipsawed in oscillating markets
  2. Many false breakouts: Price may fall back quickly after crossing above
  3. Difficult parameter selection: Need to find the period suitable for current market
  4. Parameter overfitting risk: Adjusting too much may lead to "memorizing answers"

VIII. Applicable Scenarios​

Market EnvironmentRecommended ConfigNotes
Trending bullUse freelyBig profits when trends come
Trending bearUse in reverseShort selling also profitable
Oscillating marketLower EMA periodShorter period is more sensitive
ConsolidationDisableToo many false signals

IX. Applicable Market Environments in Detail​

9.1 Core Strategy Logic​

  • EMA cross above: Trend turns from bearish to bullish
  • EMA cross below: Trend turns from bullish to bearish
  • Trailing stop: Let profits run

9.2 Performance in Different Market Environments​

Market TypeRatingAnalysis
Trending bull★★★★★MA up, price above
Trending bear★★★★★Reverse shorting also profitable
Oscillating market★★☆☆☆Crosses above/below whip saw
Consolidation★☆☆☆☆Too many false signals

X. Important Notes​

10.1 Parameter Overfitting Risk​

Parameter adjustable = overfitting risk! Too much adjustment leads to "memorizing answers"!

10.2 Hardware Requirements​

The strategy has extremely low computational load, virtually no hardware demands.


XI. Summary​

EMABreakout is a parameterized version of EMA50, more flexible. Suitable for use in markets with clear trends.