Freqtrade Strategy

Strategy001

5m candlesTrend followingSpot, long only

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.

Strategy001 account balance compared with holding Bitcoin$0$1,000$2,000$3,000$4,000JulOctJan 2024AprJulOctJan 2025AprStrategy001 $537BTC hold $3,880
Account balance from $1,000 (closed trades, daily). Dashed line: $1,000 held in BTC over the same days.
Total return−46.3%$537 final balance
Max drawdown61.9%26 Dec 2023 to 6 Apr 2025
Win rate88.8%1,431 wins / 181 losses
Profit factor0.87Gross wins ÷ gross losses
Trades1,6122.2 per day
Average trade−0.14%after fees
Average hold1d 5hwinners 21h 49m, losers 3d 16h
Annualised (CAGR)−26.7%Sharpe -1.69 · Sortino -10.79

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.

JFMAMJJASOND2023-99-7-126-19+80+134+122024-156+94+15-225+86-131+12-99+23-17+155-1952025+2-84-0+35+49

Results by coin

PairTradesWin rateProfit (USDT)Avg. hold
BNB/USDT15991.8%+35.861d 21h
SOL/USDT19689.8%+33.4514h 26m
DOT/USDT14290.1%+2.611d 1h
BTC/USDT14790.5%−2.202d 8h
ETH/USDT16290.1%−14.801d 10h
LINK/USDT14589.0%−30.8923h 54m
DOGE/USDT16187.0%−82.031d 1h
AVAX/USDT14986.6%−113.9119h 23m
XRP/USDT19087.4%−130.181d 5h
ADA/USDT16185.7%−160.7922h 43m

Why trades closed

Exit reasonTradesWin rateProfit (USDT)
Take-profit (ROI)1431100.0%+3,201.87
Still open at end of test20.0%−19.23
Stoploss1790.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.