Freqtrade Strategy

Strategy002

5m candlesMean reversionSpot, long only

Tested 1 Jun 2023 – 30 May 2025
Rank 17 of 27 by return

Strategy002 turned $1,000 into $741 (−25.9%) over 729 days, while holding Bitcoin returned +288.1% and an equal mix of the ten coins +194.8%. Its worst drawdown was 35.8%, a substantial dip to sit through. It won 91% of its trades yet still lost money, because its few losing trades were much larger than its many small wins.

Strategy002 account balance compared with holding Bitcoin$0$1,000$2,000$3,000$4,000JulOctJan 2024AprJulOctJan 2025AprStrategy002 $741BTC hold $3,880
Account balance from $1,000 (closed trades, daily). Dashed line: $1,000 held in BTC over the same days.
Total return−25.9%$741 final balance
Max drawdown35.8%2 Jul 2024 to 7 Apr 2025
Win rate90.7%419 wins / 43 losses
Profit factor0.70Gross wins ÷ gross losses
Trades4620.6 per day
Average trade−0.28%after fees
Average hold17h 31mwinners 12h 20m, losers 2d 19h
Annualised (CAGR)−13.9%Sharpe -1.06 · Sortino -5.37

How Strategy002 trades

Strategy002 buys an oversold hammer candle: RSI under 30, slow stochastic under 20 and price below the lower Bollinger Band. It exits when the Parabolic SAR flips above price and the Fisher-transformed RSI is above 0.3.

Requiring a hammer pattern on top of three oversold readings makes entries rare. Few trades means results can swing a lot on a different time window.

Rules at a glance

Indicators
RSI, Stochastic, Bollinger Bands, Hammer candle, Parabolic SAR
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-19+12-51+4-8+22+172024+1+15+16+9-0+29-62-53-13-31+19+492025-42-169-39+16+19

Results by coin

PairTradesWin rateProfit (USDT)Avg. hold
XRP/USDT5294.2%+15.3423h 25m
DOT/USDT5194.1%+10.3114h 6m
DOGE/USDT4993.9%+10.297h 1m
AVAX/USDT4390.7%−7.838h 29m
BTC/USDT4393.0%−30.0623h 29m
LINK/USDT4588.9%−31.7513h 50m
BNB/USDT4390.7%−44.291d 11h
SOL/USDT4987.8%−48.7914h 8m
ETH/USDT3987.2%−53.5720h 53m
ADA/USDT4885.4%−78.5416h 22m

Why trades closed

Exit reasonTradesWin rateProfit (USDT)
Take-profit (ROI)207100.0%+495.42
Exit signal212100.0%+112.96
Still open at end of test10.0%−11.99
Stoploss420.0%−855.27

The code

Strategy002 comes from the community freqtrade-strategies repository (GPL-3.0). These are the parts that decide when it trades; the full file is 136 lines.

Entry rules
def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
    dataframe.loc[
        (
            (dataframe['rsi'] < 30) &
            (dataframe['slowk'] < 20) &
            (dataframe['bb_lowerband'] > dataframe['close']) &
            (dataframe['CDLHAMMER'] == 100)
        ),
        'enter_long'] = 1

    return dataframe
Exit rules
def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
    dataframe.loc[
        (
            (dataframe['sar'] > dataframe['close']) &
            (dataframe['fisher_rsi'] > 0.3)
        ),
        'exit_long'] = 1
    return dataframe
Indicators
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:

    # Stoch
    stoch = ta.STOCH(dataframe)
    dataframe['slowk'] = stoch['slowk']

    # RSI
    dataframe['rsi'] = ta.RSI(dataframe)

    # Inverse Fisher transform on RSI, values [-1.0, 1.0] (https://goo.gl/2JGGoy)
    rsi = 0.1 * (dataframe['rsi'] - 50)
    dataframe['fisher_rsi'] = (numpy.exp(2 * rsi) - 1) / (numpy.exp(2 * rsi) + 1)

    # Bollinger bands
    bollinger = qtpylib.bollinger_bands(qtpylib.typical_price(dataframe), window=20, stds=2)
    dataframe['bb_lowerband'] = bollinger['lower']

    # SAR Parabol
    dataframe['sar'] = ta.SAR(dataframe)

    # Hammer: values [0, 100]
    dataframe['CDLHAMMER'] = ta.CDLHAMMER(dataframe)

    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 Strategy002 --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.