12 related strategies (⧉ identical code, ≈ similar name)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | from datetime import datetime, timedelta from typing import Optional, Union from functools import reduce import freqtrade.vendor.qtpylib.indicators as qtpylib import talib.abstract as ta import pandas_ta as pta from freqtrade.persistence import Trade from freqtrade.strategy.interface import IStrategy from freqtrade.strategy import DecimalParameter, IntParameter from pandas import DataFrame def ewo(dataframe, ema_length=5, ema2_length=35): ema1 = ta.EMA(dataframe, timeperiod=ema_length) ema2 = ta.EMA(dataframe, timeperiod=ema2_length) return (ema1 - ema2) / dataframe['low'] * 100 class binance(IStrategy): INTERFACE_VERSION = 3 minimal_roi = { "0": 10 } timeframe = '5m' process_only_new_candles = True startup_candle_count = 20 stoploss = -0.99 use_custom_stoploss = True order_types = { 'entry': 'market', 'exit': 'market', 'emergency_exit': 'market', 'force_entry': 'market', 'force_exit': 'market', 'stoploss': 'market', 'stoploss_on_exchange': False, 'stoploss_on_exchange_interval': 60, 'stoploss_on_exchange_market_ratio': 0.99 } is_optimize_ewo = True buy_rsi_fast = IntParameter(35, 50, default=50, space='buy', optimize=is_optimize_ewo) buy_rsi = IntParameter(15, 35, default=30, space='buy', optimize=is_optimize_ewo) buy_ewo = DecimalParameter(-6.0, 5, default=-1.238, space='buy', optimize=is_optimize_ewo) buy_ema_low = DecimalParameter(0.9, 0.99, default=0.956, space='buy', optimize=is_optimize_ewo) buy_ema_high = DecimalParameter(0.95, 1.2, default=0.986, space='buy', optimize=is_optimize_ewo) is_optimize_32 = True buy_rsi_fast_32 = IntParameter(20, 70, default=63, space='buy', optimize=is_optimize_32) buy_rsi_32 = IntParameter(15, 50, default=16, space='buy', optimize=is_optimize_32) buy_sma15_32 = DecimalParameter(0.900, 1, default=0.932, decimals=3, space='buy', optimize=is_optimize_32) buy_cti_32 = DecimalParameter(-1, 0, default=-0.8, decimals=2, space='buy', optimize=is_optimize_32) is_optimize_deadfish = True sell_deadfish_bb_width = DecimalParameter(0.03, 0.75, default=0.05, space='sell', optimize=is_optimize_deadfish) sell_deadfish_profit = DecimalParameter(-0.15, -0.05, default=-0.05, space='sell', optimize=is_optimize_deadfish) sell_deadfish_bb_factor = DecimalParameter(0.90, 1.20, default=1.0, space='sell', optimize=is_optimize_deadfish) sell_deadfish_volume_factor = DecimalParameter(1, 2.5, default=1.0, space='sell', optimize=is_optimize_deadfish) sell_fastx = IntParameter(50, 100, default=75, space='sell', optimize=True) def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe['sma_15'] = ta.SMA(dataframe, timeperiod=15) dataframe['cti'] = pta.cti(dataframe["close"], length=20) dataframe['rsi'] = ta.RSI(dataframe, timeperiod=14) dataframe['rsi_fast'] = ta.RSI(dataframe, timeperiod=4) dataframe['rsi_slow'] = ta.RSI(dataframe, timeperiod=20) dataframe['ema_8'] = ta.EMA(dataframe, timeperiod=8) dataframe['ema_16'] = ta.EMA(dataframe, timeperiod=16) dataframe['EWO'] = ewo(dataframe, 50, 200) stoch_fast = ta.STOCHF(dataframe, 5, 3, 0, 3, 0) dataframe['fastd'] = stoch_fast['fastd'] dataframe['fastk'] = stoch_fast['fastk'] bollinger2 = qtpylib.bollinger_bands(qtpylib.typical_price(dataframe), window=20, stds=2) dataframe['bb_lowerband2'] = bollinger2['lower'] dataframe['bb_middleband2'] = bollinger2['mid'] dataframe['bb_upperband2'] = bollinger2['upper'] dataframe['bb_width'] = ( (dataframe['bb_upperband2'] - dataframe['bb_lowerband2']) / dataframe['bb_middleband2'] ) dataframe['volume_mean_12'] = dataframe['volume'].rolling(12).mean().shift(1) dataframe['volume_mean_24'] = dataframe['volume'].rolling(24).mean().shift(1) return dataframe def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: conditions = [] dataframe['enter_tag'] = '' dataframe['enter_long'] = 0 is_ewo = ( (dataframe['rsi_fast'] < self.buy_rsi_fast.value) & (dataframe['close'] < dataframe['ema_8'] * self.buy_ema_low.value) & (dataframe['EWO'] > self.buy_ewo.value) & (dataframe['close'] < dataframe['ema_16'] * self.buy_ema_high.value) & (dataframe['rsi'] < self.buy_rsi.value) ) buy_1 = ( (dataframe['rsi_slow'] < dataframe['rsi_slow'].shift(1)) & (dataframe['rsi_fast'] < self.buy_rsi_fast_32.value) & (dataframe['rsi'] > self.buy_rsi_32.value) & (dataframe['close'] < dataframe['sma_15'] * self.buy_sma15_32.value) & (dataframe['cti'] < self.buy_cti_32.value) ) conditions.append(is_ewo) dataframe.loc[is_ewo, 'enter_tag'] += 'ewo ' conditions.append(buy_1) dataframe.loc[buy_1, 'enter_tag'] += 'buy_1 ' if conditions: dataframe.loc[ reduce(lambda x, y: x | y, conditions), 'enter_long' ] = 1 return dataframe def custom_stoploss( self, pair: str, trade: Trade, current_time: datetime, current_rate: float, current_profit: float, **kwargs ) -> float: dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe) if dataframe.empty: return self.stoploss current_candle = dataframe.iloc[-1] if current_time - timedelta(minutes=60) > trade.open_date_utc: if (current_candle["fastk"] > self.sell_fastx.value) and (current_profit > -0.01): return -0.001 if current_time - timedelta(days=1) > trade.open_date_utc: if (current_candle["fastk"] > self.sell_fastx.value) and (current_profit > -0.05): return -0.001 enter_tag = trade.enter_tag if getattr(trade, 'enter_tag', None) else '' enter_tags = enter_tag.split() if "ewo" in enter_tags and current_profit >= 0.05: return -0.005 if current_profit > 0 and current_candle["fastk"] > self.sell_fastx.value: return -0.001 return self.stoploss def custom_exit( self, pair: str, trade: Trade, current_time: datetime, current_rate: float, current_profit: float, **kwargs ) -> Optional[Union[str, bool]]: dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe) if dataframe.empty: return None current_candle = dataframe.iloc[-1] if ( (current_profit < self.sell_deadfish_profit.value) and (current_candle['bb_width'] < self.sell_deadfish_bb_width.value) and (current_candle['close'] > current_candle['bb_middleband2'] * self.sell_deadfish_bb_factor.value) and (current_candle['volume_mean_12'] < current_candle['volume_mean_24'] * self.sell_deadfish_volume_factor.value) ): return "sell_stoploss_deadfish" return None def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe['exit_long'] = 0 dataframe['exit_tag'] = '' return dataframe |
Strategy League — fixed backtest that feeds the ranking
Export report Freqtrade logsRun finished · took 405.6s
ℹ️ This strategy uses custom_stoploss() — freqtrade only
re-checks these once per 5m candle by default, not against the price movement within it.
For a more accurate read, re-run this backtest locally with --timeframe-detail 1m. Freqle doesn't do this for every check here: multiplying every
League/sweep backtest by a finer detail timeframe is more compute than the sandbox can sustain
across every indexed strategy. why this matters →
- did not beat simply holding the market
- statistically significant edge (p=0.00)
- 100% of resampled runs stayed profitable
- profitable across 98% of rolling 3-month windows
Resampling the trade sequence 2,000× shows the spread of results this edge could plausibly produce — separating a dependable strategy from one that got lucky once.
Loading charts…
Monthly breakdown
| Month | Regime | Trades | Profit % | Avg % | Win | Loss | Win % | DD % | Avg dur |
|---|---|---|---|---|---|---|---|---|---|
| Nov 2025 | bearish trending high vol | 5 | +0.52 | 1.04 | 4 | 1 | 80.0 | -0.18 | 1h 03m |
| Oct 2025 | bearish trending low vol | 9 | +18.96 | 21.05 | 9 | 0 | 100.0 | 0.0 | 0h 19m |
| Aug 2025 | bullish choppy low vol | 6 | +1.42 | 2.37 | 6 | 0 | 100.0 | 0.0 | 0h 40m |
| Feb 2025 | bearish trending low vol | 18 | +1.54 | 0.86 | 9 | 9 | 50.0 | -0.07 | 0h 18m |
| Dec 2024 | bullish trending low vol | 11 | +5.35 | 4.86 | 11 | 0 | 100.0 | 0.0 | 0h 28m |
| Nov 2024 | bullish trending low vol | 5 | +2.12 | 4.25 | 5 | 0 | 100.0 | -0.22 | 0h 20m |
| Oct 2024 | bullish choppy low vol | 1 | +0.20 | 1.95 | 1 | 0 | 100.0 | -0.28 | 0h 35m |
| Aug 2024 | bearish choppy high vol | 8 | +0.15 | 0.19 | 6 | 2 | 75.0 | -0.34 | 2h 33m |
| Jun 2024 | bearish choppy low vol | 14 | +4.16 | 2.97 | 13 | 1 | 92.9 | -0.27 | 0h 25m |
| Apr 2024 | bearish choppy high vol | 18 | +2.09 | 1.16 | 14 | 4 | 77.8 | -0.39 | 0h 42m |
| Mar 2024 | bullish trending high vol | 14 | +3.15 | 2.25 | 12 | 2 | 85.7 | -0.0 | 0h 25m |
| Feb 2024 | bullish trending low vol | 10 | +2.75 | 2.75 | 10 | 0 | 100.0 | -0.19 | 0h 28m |
| Jan 2024 | bearish choppy high vol | 14 | +3.57 | 2.55 | 12 | 2 | 85.7 | -0.34 | 1h 21m |
| Dec 2023 | bullish trending low vol | 17 | +4.02 | 2.36 | 15 | 2 | 88.2 | -0.02 | 0h 36m |
| Nov 2023 | bullish trending low vol | 12 | +2.32 | 1.93 | 12 | 0 | 100.0 | 0.0 | 0h 38m |
| Aug 2023 | bearish choppy low vol | 18 | +3.04 | 1.69 | 14 | 4 | 77.8 | -0.43 | 1h 14m |
| Jul 2023 | bullish trending low vol | 2 | +0.56 | 2.80 | 2 | 0 | 100.0 | 0.0 | 0h 32m |
| Jun 2023 | bullish trending low vol | 24 | +6.46 | 2.69 | 22 | 2 | 91.7 | -0.02 | 0h 22m |
| May 2023 | bearish choppy low vol | 1 | +0.32 | 3.18 | 1 | 0 | 100.0 | 0.0 | 0h 25m |
| Apr 2023 | bullish trending low vol | 9 | +1.65 | 1.84 | 9 | 0 | 100.0 | -0.09 | 0h 33m |
| Mar 2023 | bullish trending high vol | 10 | +0.43 | 0.43 | 4 | 6 | 40.0 | -0.12 | 1h 08m |
| Feb 2023 | bullish trending low vol | 2 | +0.29 | 1.45 | 1 | 1 | 50.0 | -0.03 | 0h 58m |
| Jan 2023 | bullish trending low vol | 18 | +3.98 | 2.21 | 17 | 1 | 94.4 | -0.01 | 0h 51m |
| Dec 2022 | bearish trending low vol | 2 | +0.26 | 1.31 | 2 | 0 | 100.0 | 0.0 | 0h 22m |
| Nov 2022 | bearish trending high vol | 32 | +4.79 | 1.50 | 25 | 7 | 78.1 | -1.53 | 1h 23m |
| Oct 2022 | bullish choppy low vol | 1 | +0.33 | 3.32 | 1 | 0 | 100.0 | -0.15 | 0h 45m |
| Sep 2022 | bearish choppy high vol | 2 | +0.30 | 1.48 | 2 | 0 | 100.0 | -0.28 | 0h 52m |
| Aug 2022 | bullish choppy high vol | 2 | +0.20 | 1.02 | 1 | 1 | 50.0 | -0.45 | 0h 10m |
| Jul 2022 | bearish trending high vol | 2 | +0.12 | 0.60 | 2 | 0 | 100.0 | -0.44 | 0h 40m |
| Jun 2022 | bearish trending high vol | 6 | -1.40 | -2.33 | 3 | 3 | 50.0 | -0.61 | 3h 25m |
| May 2022 | bearish trending high vol | 25 | +15.23 | 6.09 | 25 | 0 | 100.0 | 0.0 | 0h 25m |
| Apr 2022 | bearish choppy high vol | 1 | -0.51 | -5.08 | 0 | 1 | 0.0 | -0.18 | 2h 15m |
| Mar 2022 | bullish choppy high vol | 8 | +2.53 | 3.17 | 8 | 0 | 100.0 | 0.0 | 0h 34m |
| Feb 2022 | bearish trending high vol | 1 | +0.32 | 3.23 | 1 | 0 | 100.0 | 0.0 | 0h 15m |
| Jan 2022 | bearish trending high vol | 9 | +5.51 | 6.11 | 9 | 0 | 100.0 | -0.17 | 0h 15m |
| Dec 2021 | bearish trending high vol | 10 | +0.92 | 0.92 | 7 | 3 | 70.0 | -0.23 | 0h 53m |
| Nov 2021 | bullish trending high vol | 7 | +2.50 | 3.57 | 6 | 1 | 85.7 | -0.02 | 0h 14m |
| Oct 2021 | bullish trending high vol | 13 | +3.50 | 2.69 | 10 | 3 | 76.9 | -0.06 | 0h 15m |
| Sep 2021 | bearish trending high vol | 27 | +6.59 | 2.45 | 24 | 3 | 88.9 | -0.06 | 0h 36m |
| Jun 2021 | bearish trending high vol | 6 | +1.24 | 2.06 | 5 | 1 | 83.3 | -0.04 | 1h 04m |
| May 2021 | bearish trending high vol | 141 | +66.61 | 4.73 | 127 | 14 | 90.1 | -0.69 | 0h 42m |
| Apr 2021 | bearish choppy high vol | 53 | +23.40 | 4.41 | 45 | 8 | 84.9 | -0.48 | 0h 43m |
| Mar 2021 | bullish choppy high vol | 7 | +3.24 | 4.63 | 7 | 0 | 100.0 | 0.0 | 0h 21m |
| Feb 2021 | bullish trending high vol | 75 | +28.81 | 3.84 | 66 | 9 | 88.0 | -1.31 | 0h 27m |
| Jan 2021 | bullish trending high vol | 83 | +37.08 | 4.47 | 77 | 6 | 92.8 | -1.34 | 0h 36m |
Yearly breakdown
| Year | Trades | Profit % | Avg % | Win | Loss | Win % | DD % | Avg dur |
|---|---|---|---|---|---|---|---|---|
| 2025 | 38 | +22.44 | 5.90 | 28 | 10 | 73.7 | -0.18 | 0h 28m |
| 2024 | 95 | +23.54 | 2.48 | 84 | 11 | 88.4 | -0.39 | 0h 48m |
| 2023 | 113 | +23.07 | 2.04 | 97 | 16 | 85.8 | -0.43 | 0h 44m |
| 2022 | 91 | +27.68 | 3.04 | 79 | 12 | 86.8 | -1.53 | 0h 59m |
| 2021 | 422 | +173.89 | 4.12 | 374 | 48 | 88.6 | -1.34 | 0h 37m |
Trade charts — best 2 and worst 2 performing pairs (full OHLC candles are expensive to render for every pair)
Backtests — over a market period
Backtest this strategy over a chosen crypto-cycle period. These don't affect the League ranking, and need that period's candle data downloaded.
Log in or sign up to run backtests.
| Period | Range | Total % | Win % | Max DD | Trades | |
|---|---|---|---|---|---|---|
| 2020 · DeFi Summer & Pre-Halving Rally | 20200101-20210101 | not run | ||||
| 2021 · Institutional Bull Market | 20210101-20220101 | not run | ||||
| 2022 · Post-Bull Crash & Macro Tightening | 20220101-20230101 | not run | ||||
| 2023–2024 · Recovery & ETF Anticipation | 20230101-20250101 | not run | ||||
| 2025–2026 · Current Cycle | 20250101-20260101 | not run | ||||
Walk forward
Out-of-sample backtest on recent data · 33 pairs · 20260101-20260701.
Backtest trust check
no lookahead patterns · 1 thing(s) worth reviewing before trusting the numbers
| Line | Pattern | Detail | |
|---|---|---|---|
| 30 | review | startup_candles_too_small | startup_candle_count is 20, but .rolling(24) needs at least 24 candles -- so the first 4+ candles of every backtest use an indicator that hasn't warmed up. Recursive indicators (EMA/RSI/ADX/ATR) want several times their period, not exactly it |
ran by Ron · took s
Lookahead analysis
Freqtrade logsno lookahead bias detected
14 signal(s) analysed · 0 biased entries · 0 biased exits
ran by Ron · took 35.6s