CofiBitStrategy
Tested 1 Jun 2023 – 30 May 2025
Rank 27 of 27 by return
CofiBitStrategy turned $1,000 into $194 (−80.6%) 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.6%, deep enough that most people would have switched it off. With a 25% win rate and a profit factor of 0.23, losses outweighed gains. Once the balance fell below the $200 stake, it could no longer open trades and stopped.
How CofiBitStrategy trades
CofiBitStrategy enters when the candle opens below the 5-period EMA of lows, the fast stochastic crosses up from below 25 and ADX is above 25. It exits when price opens above the EMA of highs or the stochastic crosses above 75.
A tiered take-profit (10% at once, falling to 5% after 40 minutes) keeps trades short. The 25% stoploss is far wider than the typical win.
Rules at a glance
- Indicators
- Fast Stochastic, EMA 5 of high / low / close, ADX
- Take-profit (minimal ROI)
- 10% from entry; 7% after 20m; 6% after 30m; 5% after 40m
- Stoploss
- −25%
- 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 |
|---|---|---|---|---|
| AVAX/USDT | 161 | 41.0% | −28.01 | 31m |
| XRP/USDT | 232 | 30.6% | −50.85 | 28m |
| DOGE/USDT | 224 | 22.8% | −68.57 | 29m |
| BNB/USDT | 187 | 20.9% | −70.30 | 34m |
| DOT/USDT | 260 | 26.9% | −76.12 | 30m |
| SOL/USDT | 253 | 41.5% | −80.73 | 32m |
| ADA/USDT | 232 | 25.9% | −95.58 | 32m |
| LINK/USDT | 288 | 31.9% | −98.30 | 32m |
| ETH/USDT | 296 | 9.5% | −116.34 | 29m |
| BTC/USDT | 336 | 9.2% | −120.91 | 28m |
Why trades closed
| Exit reason | Trades | Win rate | Profit (USDT) |
|---|---|---|---|
| Exit signal | 2469 | 24.8% | −805.72 |
The code
CofiBitStrategy comes from the community freqtrade-strategies repository (GPL-3.0). These are the parts that decide when it trades; the full file is 94 lines.
Entry rules
def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[ ( (dataframe['open'] < dataframe['ema_low']) & (qtpylib.crossed_above(dataframe['fastk'], dataframe['fastd'])) & (dataframe['fastk'] < self.buy_fastx.value) & (dataframe['fastd'] < self.buy_fastx.value) & (dataframe['adx'] > self.buy_adx.value) ), 'enter_long'] = 1 return dataframe
Exit rules
def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[ ( (dataframe['open'] >= dataframe['ema_high']) ) | ( (qtpylib.crossed_above(dataframe['fastk'], self.sell_fastx.value)) | (qtpylib.crossed_above(dataframe['fastd'], self.sell_fastx.value)) ), 'exit_long'] = 1 return dataframe
Indicators
def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: stoch_fast = ta.STOCHF(dataframe, 5, 3, 0, 3, 0) dataframe['fastd'] = stoch_fast['fastd'] dataframe['fastk'] = stoch_fast['fastk'] dataframe['ema_high'] = ta.EMA(dataframe, timeperiod=5, price='high') dataframe['ema_close'] = ta.EMA(dataframe, timeperiod=5, price='close') dataframe['ema_low'] = ta.EMA(dataframe, timeperiod=5, price='low') dataframe['adx'] = ta.ADX(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 CofiBitStrategy --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.