Freqtrade Strategy

TechnicalExampleStrategy

5m candlesMoney flowSpot, long only

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

TechnicalExampleStrategy turned $1,000 into $201 (−80.0%) 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 80.0%, deep enough that most people would have switched it off. With a 26% win rate and a profit factor of 0.27, losses outweighed gains.

TechnicalExampleStrategy account balance compared with holding Bitcoin$0$1,000$2,000$3,000$4,000JulOctJan 2024AprJulOctJan 2025AprTechnicalExampleStrategy $201BTC hold $3,880
Account balance from $1,000 (closed trades, daily). Dashed line: $1,000 held in BTC over the same days.
Total return−80.0%$201 final balance
Max drawdown80.0%1 Jun 2023 to 14 Jul 2023
Win rate26.0%479 wins / 1,365 losses
Profit factor0.27Gross wins ÷ gross losses
Trades1,8442.5 per day
Average trade−0.22%after fees
Average hold50mwinners 43m, losers 52m
Annualised (CAGR)−55.3%Sharpe -15.26 · Sortino -15.31

How TechnicalExampleStrategy trades

A single-indicator example from the technical library. It buys whenever Chaikin Money Flow is negative and sells when it turns positive, with a 1% take-profit and a 5% stoploss.

Included as a baseline. It shows how a one-line rule performs under exactly the same test conditions as the more elaborate strategies.

Rules at a glance

Indicators
Chaikin Money Flow 21
Take-profit (minimal ROI)
1% from entry
Stoploss
−5%
Trailing stop
Off
Exit signal
Used

Results by month

Profit or loss in USDT for trades closed in each month.

JFMAMJJASOND2023-704-96

Results by coin

PairTradesWin rateProfit (USDT)Avg. hold
DOGE/USDT13418.7%−46.6241m
LINK/USDT11620.7%−51.1852m
AVAX/USDT13130.5%−51.7045m
XRP/USDT16633.1%−57.8153m
DOT/USDT13324.1%−73.2052m
BTC/USDT25718.7%−83.4744m
BNB/USDT19226.6%−87.2149m
ETH/USDT22918.3%−89.2349m
SOL/USDT27734.7%−123.7049m
ADA/USDT20931.6%−135.341h 3m

Why trades closed

Exit reasonTradesWin rateProfit (USDT)
Take-profit (ROI)58100.0%+116.05
Stoploss170.0%−175.85
Exit signal176923.8%−739.67

The code

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

Entry rules
def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
    dataframe.loc[
        (
            (
                (dataframe['cmf'] < 0)

            )
        ),
        'enter_long'] = 1
    return dataframe
Exit rules
def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
    # different strategy used for sell points, due to be able to duplicate it to 100%
    dataframe.loc[
        (
            (dataframe['cmf'] > 0)
        ),
        'exit_long'] = 1
    return dataframe
Indicators
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame:
    dataframe['cmf'] = cmf(dataframe, 21)

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