Skip to main content

XebTradeStrat Strategy Analysis

Strategy Number: #31
Strategy Type: Minimalist Trend Following Strategy
Timeframe: 1 minute (1m)


I. Strategy Overview

XebTradeStrat is an extremely simplified trend following strategy. Its core design philosophy is to capture short-term price trends through moving average golden crossovers. The strategy adopts the most basic EMA (Exponential Moving Average) crossover signal as entry trigger condition, known for its simplicity among numerous complex Freqtrade strategies.

The strategy's code volume is very small, entire strategy file contains only about 60 lines of code, without any complex indicator calculations or protection mechanisms. This minimalist design makes the strategy have extremely high execution efficiency, very low hardware resource requirements, while greatly reducing overfitting risk.

Core Features

FeatureDescription
Entry Conditions1 independent entry signal (EMA5 crosses above EMA10)
Exit Conditions0 (no active exit signals, completely relies on take-profit/stoploss)
ProtectionNone (no entry protection parameters)
Timeframe1 minute
Dependenciestalib, technical

II. Strategy Configuration Analysis

2.1 Base Risk Parameters

# ROI exit table
minimal_roi = {
"4": 0.002, # Exit at 0.2% profit after 4 minutes
"2": 0.005, # Exit at 0.5% profit after 2 minutes
"0": 0.01 # Immediate exit requires 1% profit
}

# Stoploss setting
stoploss = -0.01 # 1% fixed stoploss

Design Logic:

This ROI table design reflects the strategy's short-term trading characteristics. Price fluctuations under 1-minute timeframe are relatively small, therefore strategy adopts a relatively tight take-profit gradient:

  • 0 minutes threshold 1%: This is most aggressive take-profit setting, means can exit at 1% profit immediately after opening
  • 2 minutes threshold 0.5%: Slightly lower expectations, give price more fluctuation space
  • 4 minutes threshold 0.2%: Further lower profit expectations, indicates strategy pursues accumulating small profits

2.2 Trailing Stop Configuration

# Trailing stop settings
trailing_stop = True # Enable trailing stop
trailing_only_offset_is_reached = True # Only activate after reaching offset
trailing_stop_positive_offset = 0.001 # Start tracking after 0.1% offset
trailing_stop_positive = 0.0005 # 0.05% retracement triggers exit

Design Logic:

Trailing stop design is very conservative; 0.05% retracement threshold means even with tiny profits, strategy will lock them. This design suitable for protecting existing profits on highly volatile 1-minute charts, preventing rapid profit retracement.

2.3 Order Type Configuration

order_types = {
"entry": "limit", # Limit order entry
"exit": "limit" # Limit order exit
}

This strategy doesn't explicitly define order_types dictionary, uses Freqtrade default configuration.


III. Entry Conditions Details

3.1 Single Entry Condition

This strategy has only one entry condition, code as follows:

def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe.loc[
(
(dataframe['ema5'] > dataframe['ema10']) &
(dataframe['ema5'].shift(1) < dataframe['ema10'].shift(1)) &
(dataframe['volume'] > 0)
),
'buy'] = 1
return dataframe

Logic Breakdown:

  1. EMA5 > EMA10: 5-period EMA above 10-period MA, represents short-term trend upward
  2. EMA5.shift(1) < EMA10.shift(1): Previous moment EMA5 below EMA10, represents golden cross occurred
  3. volume > 0: Ensure actual trading volume, exclude false signals

Technical Meaning:

This condition is essentially classic "golden cross" strategy. Golden cross is one of most basic trend confirmation signals in technical analysis; when shorter-period moving average crosses from below through longer-period moving average, typically viewed as bullish signal.

3.2 Indicator Calculation

def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
dataframe['ema5'] = ta.EMA(dataframe, timeperiod=5)
dataframe['ema10'] = ta.EMA(dataframe, timeperiod=10)
return dataframe

Strategy only calculates two EMA indicators, computation extremely small, this is also main reason for its high execution efficiency.


IV. Exit Logic Details

4.1 Exit Signal Status

def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
"""
no sell signal
"""
dataframe.loc[:, 'sell'] = 0
return dataframe

This strategy completely has no active exit signals. All exit decisions completely rely on:

  1. ROI Take-Profit: Automatically triggers take-profit based on holding time
  2. Fixed Stoploss: -1% fixed stoploss line
  3. Trailing Stop: 0.05% retracement triggers exit

4.2 Exit Mechanism Analysis

Exit MethodTrigger ConditionPriority
Fixed StoplossLoss 1%First priority
Trailing StopProfit retracement 0.05%Second priority
ROI Take-ProfitHolding time reaches thresholdThird priority

This design means strategy is actually a "buy and hold" strategy, until price hits any of above exit conditions.


V. Technical Indicator System

5.1 Core Indicators

Indicator CategorySpecific IndicatorPurpose
Trend IndicatorEMA(5)Short-term trend following
Trend IndicatorEMA(10)Medium-term trend baseline
Volume Validationvolume > 0Filter false signals

5.2 Indicator Parameter Analysis

ParameterValueExplanation
EMA Period 15Quick response to price changes
EMA Period 210Filter noise, confirm trend

5 and 10 EMA combination is a classic pairing. 5-period EMA sensitive enough to quickly capture short-term trend changes; 10-period EMA provides relatively stable reference baseline. Combined, can filter some false signals while maintaining sensitivity.


VI. Risk Management Features

6.1 Fixed Stoploss Mechanism

stoploss = -0.01

1% fixed stoploss is common setting in cryptocurrency trading. This stoploss magnitude relatively reasonable for 1-minute timeframe, can tolerate normal fluctuations while effectively controlling single trade maximum loss.

6.2 Conservative Trailing Stop

trailing_stop_positive = 0.0005  # 0.05%

0.05% trailing stop threshold extremely conservative. On 1-minute charts, price fluctuates frequently; this setting will cause large number of small profits to be locked early. From positive perspective, effectively prevents profit retracement; negative aspect, may miss larger trend moves.

6.3 ROI Take-Profit Gradient

Holding TimeTake-Profit ThresholdStrategy Intent
0 minutes1%Quickly accumulate small profits
2 minutes0.5%Give market some fluctuation space
4 minutes0.2%Final ultimatum, must leave

This design's core philosophy is "accumulate small into many", doesn't pursue large single-trade profit, but accumulates returns through frequent small take-profits.


VII. Strategy Pros & Cons

✅ Pros

  1. Minimalist Code Structure: Only 60 lines of code, easy to understand and modify
  2. High Execution Efficiency: Indicator computation extremely small, low CPU and memory requirements
  3. Low Overfit Risk: Very few parameters, only two EMA periods
  4. Fast Backtest: Due to simple computation, backtest time extremely short
  5. Suitable for Beginners: Best entry case for learning Freqtrade strategy development

⚠️ Cons

  1. No Protection Mechanisms: No entry protection parameters, easy to enter during violent fluctuations
  2. No Exit Signals: Completely relies on take-profit/stoploss, no active timing exit
  3. 1-Minute Noise: Many false signals on extremely short timeframe
  4. No Trend Filtering: Doesn't distinguish bull and bear market environments
  5. Low Capital Utilization: Conservative take-profit settings may cause too high trading frequency

VIII. Applicable Scenarios

Market EnvironmentRecommended ConfigurationDescription
High volatility coinsReduce pair countVolatility brings more crossover signals
Low volatility coinsConsider longer periodsReduce invalid crossovers
Clear trending marketUsableGolden cross signals more accurate
Ranging marketNot recommendedMany crossover signals are false breakouts

IX. Detailed Applicable Market Environments

XebTradeStrat as a minimalist trend following strategy, its performance highly depends on market environment characteristics. Understanding strategy performance under different market conditions crucial for correct usage.

9.1 Strategy Core Logic

This strategy's core can be summarized as "immediate entry after trend confirmation". It doesn't predict trends, but waits until trend already confirmed before entering. This passive following design philosophy makes it perform better in markets with clear trends, while easy to generate many small losses in ranging markets.

9.2 Performance in Different Market Environments

Market TypePerformance RatingReason Analysis
📈 Strong uptrend⭐⭐⭐⭐Golden crosses frequent and effective, trend continuity good
📉 Strong downtrend⭐⭐Counter-trend buying, even with crosses may continue falling
🔄 Ranging market⭐⭐Crossover signals frequent but mostly fail, generates trading wear
⚡ High volatility sidewaysPrice violent fluctuations generate many false crossovers

9.3 Key Configuration Recommendations

Configuration ItemSuggested ValueDescription
Pair selectionMainstream coinsGood liquidity, fluctuations relatively predictable
Max positions1-2Avoid holding too many positions simultaneously
TimeframeCan try 5m/15mReduce noise, improve signal quality
Stoploss adjustmentCan widen to -2%Give more fluctuation space

X. Important Reminders: The Cost of Complexity

10.1 Learning Cost

XebTradeStrat is ideal starting point for learning Freqtrade. It demonstrates basic structure of strategy development:

  • How to define indicators
  • How to set entry conditions
  • How to configure ROI and stoploss

But precisely because of its simplicity, not suitable as sole strategy for production environment.

10.2 Hardware Requirements

Number of PairsMinimum MemoryRecommended Memory
1-10512MB1GB
10-501GB2GB
50+2GB4GB

This strategy has extremely low hardware requirements, because almost no complex computation.

10.3 Backtest vs Live Trading Differences

1-minute timeframe backtest results often have large differences from live trading, reasons include:

  • Slippage Impact: 1-minute K-line high-frequency trading extremely sensitive to slippage
  • Liquidity Limits: Large orders in live trading may not execute at backtest prices
  • Exchange Limits: Some exchanges have API limits on high-frequency trading

10.4 Manual Trader Suggestions

If you plan to manually execute this strategy:

  • Focus on main trend direction (daily chart)
  • Only use entry signals when trend upward
  • Consider manually setting wider stoploss

XI. Summary

XebTradeStrat is a typical case of "great truths are simple". It implements basic trend following functionality with minimal code, providing textbook-level example for Freqtrade strategy development.

Its core values are:

  1. Simplicity: Code readability extremely high, easy to learn and modify
  2. Low Threshold: Low technical knowledge requirements, quick entry
  3. Extensibility: Can add various protection mechanisms and complex conditions based on this skeleton

For quantitative traders, if you're looking for a strategy that can be quickly deployed, with extremely low computational resource requirements, XebTradeStrat is a base choice worth considering. But remember, overly simple strategies often difficult to cope with complex and changing market environments; recommend using it as one member of strategy portfolio, not sole trading tool.


Document Version: v1.0
Strategy Series: Minimalist Trend Following