Strategy001
Tested 1 Jun 2023 – 30 May 2025
Rank 19 of 27 by return
Strategy001 turned $1,000 into $537 (−46.3%) over 729 days, while holding Bitcoin returned +288.1% and an equal mix of the ten coins +194.8%. Its worst drawdown was a severe 61.9%, deep enough that most people would have switched it off. It won 89% of its trades yet still lost money, because its few losing trades were much larger than its many small wins.
How Strategy001 trades
Freqtrade's first sample strategy. It buys when the 20 EMA crosses above the 50 EMA and the latest Heikin-Ashi candle is green and above the 20 EMA. It exits when the 50 crosses above the 100 with a red Heikin-Ashi candle, but only if the trade is in profit.
Because exits only fire in profit, losing trades are closed by the 10% stoploss or wait for the ROI table. It is a learning template rather than a finished system.
Rules at a glance
- Indicators
- EMA 20 / 50 / 100, Heikin-Ashi candles
- Take-profit (minimal ROI)
- 5% from entry; 4% after 20m; 3% after 30m; 1% after 1h 0m
- Stoploss
- −10%
- Trailing stop
- Off
- Exit signal
- Used
Results by month
Profit or loss in USDT for trades closed in each month.
Results by coin
| Pair | Trades | Win rate | Profit (USDT) | Avg. hold |
|---|---|---|---|---|
| BNB/USDT | 159 | 91.8% | +35.86 | 1d 21h |
| SOL/USDT | 196 | 89.8% | +33.45 | 14h 26m |
| DOT/USDT | 142 | 90.1% | +2.61 | 1d 1h |
| BTC/USDT | 147 | 90.5% | −2.20 | 2d 8h |
| ETH/USDT | 162 | 90.1% | −14.80 | 1d 10h |
| LINK/USDT | 145 | 89.0% | −30.89 | 23h 54m |
| DOGE/USDT | 161 | 87.0% | −82.03 | 1d 1h |
| AVAX/USDT | 149 | 86.6% | −113.91 | 19h 23m |
| XRP/USDT | 190 | 87.4% | −130.18 | 1d 5h |
| ADA/USDT | 161 | 85.7% | −160.79 | 22h 43m |
Why trades closed
| Exit reason | Trades | Win rate | Profit (USDT) |
|---|---|---|---|
| Take-profit (ROI) | 1431 | 100.0% | +3,201.87 |
| Still open at end of test | 2 | 0.0% | −19.23 |
| Stoploss | 179 | 0.0% | −3,645.53 |
The code
Strategy001 comes from the community freqtrade-strategies repository (GPL-3.0). These are the parts that decide when it trades; the full file is 122 lines.
Entry rules
def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[ ( qtpylib.crossed_above(dataframe['ema20'], dataframe['ema50']) & (dataframe['ha_close'] > dataframe['ema20']) & (dataframe['ha_open'] < dataframe['ha_close']) # green bar ), 'enter_long'] = 1 return dataframe
Exit rules
def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[ ( qtpylib.crossed_above(dataframe['ema50'], dataframe['ema100']) & (dataframe['ha_close'] < dataframe['ema20']) & (dataframe['ha_open'] > dataframe['ha_close']) # red bar ), 'exit_long'] = 1 return dataframe
Indicators
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe['ema20'] = ta.EMA(dataframe, timeperiod=20) dataframe['ema50'] = ta.EMA(dataframe, timeperiod=50) dataframe['ema100'] = ta.EMA(dataframe, timeperiod=100) heikinashi = qtpylib.heikinashi(dataframe) dataframe['ha_open'] = heikinashi['open'] dataframe['ha_close'] = heikinashi['close'] return dataframe
Reproduce this test
With freqtrade installed (see our Docker guide), download the data and run the same backtest:
freqtrade download-data --exchange binance --pairs ADA/USDT AVAX/USDT BNB/USDT BTC/USDT DOGE/USDT DOT/USDT ETH/USDT LINK/USDT SOL/USDT XRP/USDT --timeframes 5m --timerange 20230501-20250530
freqtrade backtesting --strategy Strategy001 --timeframe 5m \
--timerange 20230601-20250530 --dry-run-wallet 1000 --stake-amount 200 --max-open-trades 5 --fee 0.001
Results can differ slightly with a different data source or freqtrade version. See how we test.