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
| Feature | Description |
|---|---|
| Entry Conditions | 1 independent entry signal (EMA5 crosses above EMA10) |
| Exit Conditions | 0 (no active exit signals, completely relies on take-profit/stoploss) |
| Protection | None (no entry protection parameters) |
| Timeframe | 1 minute |
| Dependencies | talib, 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:
- EMA5 > EMA10: 5-period EMA above 10-period MA, represents short-term trend upward
- EMA5.shift(1) < EMA10.shift(1): Previous moment EMA5 below EMA10, represents golden cross occurred
- 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:
- ROI Take-Profit: Automatically triggers take-profit based on holding time
- Fixed Stoploss: -1% fixed stoploss line
- Trailing Stop: 0.05% retracement triggers exit
4.2 Exit Mechanism Analysis
| Exit Method | Trigger Condition | Priority |
|---|---|---|
| Fixed Stoploss | Loss 1% | First priority |
| Trailing Stop | Profit retracement 0.05% | Second priority |
| ROI Take-Profit | Holding time reaches threshold | Third 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 Category | Specific Indicator | Purpose |
|---|---|---|
| Trend Indicator | EMA(5) | Short-term trend following |
| Trend Indicator | EMA(10) | Medium-term trend baseline |
| Volume Validation | volume > 0 | Filter false signals |
5.2 Indicator Parameter Analysis
| Parameter | Value | Explanation |
|---|---|---|
| EMA Period 1 | 5 | Quick response to price changes |
| EMA Period 2 | 10 | Filter 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 Time | Take-Profit Threshold | Strategy Intent |
|---|---|---|
| 0 minutes | 1% | Quickly accumulate small profits |
| 2 minutes | 0.5% | Give market some fluctuation space |
| 4 minutes | 0.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
- Minimalist Code Structure: Only 60 lines of code, easy to understand and modify
- High Execution Efficiency: Indicator computation extremely small, low CPU and memory requirements
- Low Overfit Risk: Very few parameters, only two EMA periods
- Fast Backtest: Due to simple computation, backtest time extremely short
- Suitable for Beginners: Best entry case for learning Freqtrade strategy development
⚠️ Cons
- No Protection Mechanisms: No entry protection parameters, easy to enter during violent fluctuations
- No Exit Signals: Completely relies on take-profit/stoploss, no active timing exit
- 1-Minute Noise: Many false signals on extremely short timeframe
- No Trend Filtering: Doesn't distinguish bull and bear market environments
- Low Capital Utilization: Conservative take-profit settings may cause too high trading frequency
VIII. Applicable Scenarios
| Market Environment | Recommended Configuration | Description |
|---|---|---|
| High volatility coins | Reduce pair count | Volatility brings more crossover signals |
| Low volatility coins | Consider longer periods | Reduce invalid crossovers |
| Clear trending market | Usable | Golden cross signals more accurate |
| Ranging market | Not recommended | Many 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 Type | Performance Rating | Reason 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 sideways | ⭐ | Price violent fluctuations generate many false crossovers |
9.3 Key Configuration Recommendations
| Configuration Item | Suggested Value | Description |
|---|---|---|
| Pair selection | Mainstream coins | Good liquidity, fluctuations relatively predictable |
| Max positions | 1-2 | Avoid holding too many positions simultaneously |
| Timeframe | Can try 5m/15m | Reduce noise, improve signal quality |
| Stoploss adjustment | Can 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 Pairs | Minimum Memory | Recommended Memory |
|---|---|---|
| 1-10 | 512MB | 1GB |
| 10-50 | 1GB | 2GB |
| 50+ | 2GB | 4GB |
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:
- Simplicity: Code readability extremely high, easy to learn and modify
- Low Threshold: Low technical knowledge requirements, quick entry
- 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