15 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 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 | # --- Do not remove these libs --- from freqtrade.strategy.interface import IStrategy from functools import reduce from pandas import DataFrame # -------------------------------- import talib.abstract as ta import freqtrade.vendor.qtpylib.indicators as qtpylib from freqtrade.strategy import DecimalParameter, IntParameter from freqtrade.persistence import Trade from datetime import datetime, timedelta# ######################################################################################################################################################## # ewo ######################################################################################################################################################## def EWO(dataframe, ema_length=5, ema2_length=35): df = dataframe.copy() ema1 = ta.EMA(df, timeperiod=ema_length) ema2 = ta.EMA(df, timeperiod=ema2_length) emadif = (ema1 - ema2) / df['close'] * 100 return emadif ######################################################################################################################################################## class ElliotV8HO(IStrategy): ######################################################################################################################################################## # Hyperopt ######################################################################################################################################################## # Sell hyperspace params: v1 # sell_params = { # "base_nb_candles_sell": 24, # "high_offset": 0.991, # "high_offset_2": 0.997 # } # Sell hyperspace params: v5 # sell_params = { # "base_nb_candles_sell": 30, # "high_offset": 0.973, # "high_offset_2": 1.121, # } buy_params = { "base_nb_candles_buy": 19, "ewo_high": 5.417, "ewo_low": -17.251, "low_offset": 0.983, "rsi_buy": 61, } sell_params = { "base_nb_candles_sell": 24, "high_offset": 1.011, "high_offset_2": 0.997, } slippage_protection = { 'retries': 3, 'max_slippage': -0.02 } ######################################################################################################################################################## # Main ######################################################################################################################################################## can_short = False minimal_roi = { "0": 0.09, } ignore_roi_if_entry_signal = False stoploss = -0.25 use_custom_stoploss = False trailing_stop = True trailing_stop_positive = 0.001 trailing_stop_positive_offset = 0.01 trailing_only_offset_is_reached = True use_entry_signal = True use_custom_entry = False use_exit_signal = True use_custom_exit = True exit_profit_only = False exit_profit_offset = 0.03 ######################################################################################################################################################## # Main ######################################################################################################################################################## timeframe = '5m' informative = '1h' process_only_new_candles = False startup_candle_count = 200 order_types = { 'entry': 'market', 'exit': 'market', 'trailing_stop_loss': 'market', 'emergency_exit': 'market', 'force_entry': 'market', 'force_exit': 'market', 'stoploss': 'market', 'stoploss_on_exchange': False, 'stoploss_on_exchange_interval': 60, 'stoploss_on_exchange_limit_ratio': 0.99 } order_time_in_force = { 'entry': 'gtc', 'exit': 'gtc' } plot_config = { 'main_plot': { 'ma_buy': {'color': 'orange'}, # Color for the buy moving average. 'ma_sell': {'color': 'orange'}, # Color for the sell moving average. }, } ######################################################################################################################################################## # Trade Protections ######################################################################################################################################################## @property def protections(self): return [ # Cooldown any signal for 5 candles (25 m) after a trade { "method": "CooldownPeriod", "stop_duration_candles": 5 }, # Allow up to 3% drawdown over the last 9 h before pausing { "method": "MaxDrawdown", "lookback_period_candles": 72, # 6 h → 9 h "trade_limit": 20, "stop_duration_candles": 6, # longer pause "max_allowed_drawdown": 0.03 # 3% drawdown allowed }, # Only guard if you’ve lost >3% over a rolling 4 h period { "method": "StoplossGuard", "lookback_period_candles": 48, # 4 h "trade_limit": 4, "stop_duration_candles": 4, "only_per_pair": False }, # Prevent pairs that only net <2% profit over 2 h, block for 1 h { "method": "LowProfitPairs", "lookback_period_candles": 24, # 2 h "trade_limit": 2, "stop_duration_candles": 12, # 1 h "required_profit": 0.02 # 2% }, # Prevent pairs that only net <4% profit over 12 h, block for 2 h { "method": "LowProfitPairs", "lookback_period_candles": 144, # 12 h "trade_limit": 4, "stop_duration_candles": 24, # 2 h "required_profit": 0.04 # 4% } ] ######################################################################################################################################################## ######################################################################################################################################################## # Parameters ######################################################################################################################################################## # SMAOffset base_nb_candles_buy = IntParameter(15, 60, default=buy_params['base_nb_candles_buy'], space='buy', optimize=True) base_nb_candles_sell = IntParameter(15, 60, default=sell_params['base_nb_candles_sell'], space='sell', optimize=True) low_offset = DecimalParameter(0.9, 0.99, default=buy_params['low_offset'], space='buy', optimize=True) high_offset = DecimalParameter(0.9, 1.1, default=sell_params['high_offset'], space='sell', optimize=True) high_offset_2 = DecimalParameter(0.99, 1.2, default=sell_params['high_offset_2'], space='sell', optimize=True) # Protection fast_ewo = 50 slow_ewo = 200 ewo_low = DecimalParameter(-20.0, -15.0, default=buy_params['ewo_low'], space='buy', optimize=True) ewo_high = DecimalParameter(1.0, 8.0, default=buy_params['ewo_high'], space='buy', optimize=True) rsi_buy = IntParameter(25, 75, default=buy_params['rsi_buy'], space='buy', optimize=True) ######################################################################################################################################################## # Informative ######################################################################################################################################################## def informative_pairs(self): pairs = self.dp.current_whitelist() informative_pairs = [(pair, self.informative) for pair in pairs] return informative_pairs ######################################################################################################################################################## def get_informative_indicators(self, metadata: dict): dataframe = self.dp.get_pair_dataframe( pair=metadata['pair'], timeframe=self.informative) return dataframe ######################################################################################################################################################## # Indicators ######################################################################################################################################################## def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: if self.config['runmode'].value == 'hyperopt': # Calculate all ma_buy values for val in self.base_nb_candles_buy.range: dataframe[f'ma_buy_{val}'] = ta.EMA(dataframe, timeperiod=val) # Calculate all ma_sell values for val in self.base_nb_candles_sell.range: dataframe[f'ma_sell_{val}'] = ta.EMA(dataframe, timeperiod=val) else: dataframe[f'ma_buy_{self.base_nb_candles_buy.value}'] = ta.EMA( dataframe, timeperiod=self.base_nb_candles_buy.value) dataframe[f'ma_sell_{self.base_nb_candles_sell.value}'] = ta.EMA( dataframe, timeperiod=self.base_nb_candles_sell.value) dataframe['hma_50'] = qtpylib.hull_moving_average( dataframe['close'], window=50) dataframe['sma_9'] = ta.SMA(dataframe, timeperiod=9) # Elliot dataframe['EWO'] = EWO(dataframe, self.fast_ewo, self.slow_ewo) # RSI dataframe['rsi'] = ta.RSI(dataframe, timeperiod=14) dataframe['rsi_fast'] = ta.RSI(dataframe, timeperiod=4) dataframe['rsi_slow'] = ta.RSI(dataframe, timeperiod=20) return dataframe ######################################################################################################################################################## # Entry Trend ######################################################################################################################################################## def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe['enter_long'] = 0 dataframe['enter_tag'] = None # Condition 1: EWO above high condition_ewo_high = ( (dataframe['rsi_fast'] < 35) & (dataframe['close'] < (dataframe[f'ma_buy_{self.base_nb_candles_buy.value}'] * self.low_offset.value)) & (dataframe['EWO'] > self.ewo_high.value) & (dataframe['rsi'] < self.rsi_buy.value) & (dataframe['volume'] > 0) & (dataframe['close'] < (dataframe[f'ma_sell_{self.base_nb_candles_sell.value}'] * self.high_offset.value)) ) dataframe.loc[condition_ewo_high, ['enter_long', 'enter_tag']] = [1, 'ewo_high'] # Condition 2: EWO below low condition_ewo_low = ( (dataframe['rsi_fast'] < 35) & (dataframe['close'] < (dataframe[f'ma_buy_{self.base_nb_candles_buy.value}'] * self.low_offset.value)) & (dataframe['EWO'] < self.ewo_low.value) & (dataframe['volume'] > 0) & (dataframe['close'] < (dataframe[f'ma_sell_{self.base_nb_candles_sell.value}'] * self.high_offset.value)) ) dataframe.loc[condition_ewo_low, ['enter_long', 'enter_tag']] = [1, 'ewo_low'] return dataframe ######################################################################################################################################################## # Exit Trend ######################################################################################################################################################## def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: conditions = [] conditions.append( ( (dataframe['close'] > dataframe['hma_50']) & (dataframe['close'] > (dataframe[f'ma_sell_{self.base_nb_candles_sell.value}'] * self.high_offset_2.value)) & (dataframe['rsi'] > 50) & (dataframe['volume'] > 0) & (dataframe['rsi_fast'] > dataframe['rsi_slow']) ) | ( (dataframe['close'] < dataframe['hma_50']) & (dataframe['close'] > (dataframe[f'ma_sell_{self.base_nb_candles_sell.value}'] * self.high_offset.value)) & (dataframe['volume'] > 0) & (dataframe['rsi_fast'] > dataframe['rsi_slow']) ) ) if conditions: dataframe.loc[ reduce(lambda x, y: x | y, conditions), ['exit_long', 'exit_tag'] ] = [1, 'hma_15'] return dataframe ######################################################################################################################################################## # Custom to Sell unclog ######################################################################################################################################################## def custom_exit(self, pair: str, trade: 'Trade', current_time: 'datetime', current_rate: float, current_profit: float, **kwargs): # Sell any positions at a loss if they are held for more than X days. if current_profit <= 0 and (current_time - trade.open_date_utc).days >= 10: return 'unclog' if current_profit >= 0 and (current_time - trade.open_date_utc).days >= 10: return 'unclog' |
Strategy League — fixed backtest that feeds the ranking
Export report Freqtrade logsRun finished · took 287.2s
ℹ️ This strategy uses a trailing stop — 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 92% 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 |
|---|---|---|---|---|---|---|---|---|---|
| Dec 2025 | bearish trending low vol | 1 | -0.10 | -0.95 | 0 | 1 | 0.0 | -0.45 | 2h 50m |
| Nov 2025 | bearish trending high vol | 40 | +2.01 | 0.50 | 35 | 5 | 87.5 | -0.52 | 0h 41m |
| Oct 2025 | bearish trending low vol | 42 | +1.62 | 0.38 | 37 | 5 | 88.1 | -2.4 | 0h 27m |
| Sep 2025 | bullish choppy low vol | 10 | -0.01 | -0.01 | 7 | 3 | 70.0 | -0.35 | 1h 06m |
| Jul 2025 | bullish choppy low vol | 6 | +0.07 | 0.11 | 5 | 1 | 83.3 | -0.17 | 1h 25m |
| Jun 2025 | bearish choppy low vol | 8 | +0.53 | 0.66 | 7 | 1 | 87.5 | -0.29 | 0h 33m |
| May 2025 | bullish trending low vol | 2 | +0.20 | 0.97 | 2 | 0 | 100.0 | -0.41 | 0h 10m |
| Apr 2025 | bullish choppy low vol | 3 | -0.44 | -1.48 | 2 | 1 | 66.7 | -0.49 | 1h 42m |
| Mar 2025 | bearish trending high vol | 8 | +0.04 | 0.06 | 6 | 2 | 75.0 | -0.31 | 1h 06m |
| Feb 2025 | bearish trending low vol | 2 | +0.23 | 1.15 | 2 | 0 | 100.0 | -0.09 | 0h 20m |
| Jan 2025 | bearish choppy low vol | 1 | +0.11 | 1.06 | 1 | 0 | 100.0 | -0.14 | 0h 25m |
| Dec 2024 | bullish trending low vol | 52 | +2.75 | 0.53 | 41 | 11 | 78.8 | -0.39 | 0h 52m |
| Nov 2024 | bullish trending low vol | 87 | +4.55 | 0.52 | 71 | 16 | 81.6 | -0.31 | 0h 45m |
| Sep 2024 | bearish choppy low vol | 1 | +0.17 | 1.65 | 1 | 0 | 100.0 | -0.28 | 1h 00m |
| Aug 2024 | bearish choppy high vol | 4 | +0.50 | 1.25 | 4 | 0 | 100.0 | -0.53 | 0h 51m |
| Jun 2024 | bearish choppy low vol | 3 | +0.30 | 1.01 | 3 | 0 | 100.0 | -0.74 | 0h 33m |
| May 2024 | bullish choppy high vol | 1 | +0.11 | 1.13 | 1 | 0 | 100.0 | -0.76 | 0h 30m |
| Apr 2024 | bearish choppy high vol | 3 | -1.50 | -4.99 | 2 | 1 | 66.7 | -0.81 | 1h 32m |
| Mar 2024 | bullish trending high vol | 21 | +1.38 | 0.66 | 18 | 3 | 85.7 | -0.31 | 0h 48m |
| Feb 2024 | bullish trending low vol | 9 | +0.73 | 0.82 | 8 | 1 | 88.9 | -0.07 | 0h 37m |
| Jan 2024 | bearish choppy high vol | 12 | +0.80 | 0.67 | 11 | 1 | 91.7 | -0.28 | 0h 29m |
| Dec 2023 | bullish trending low vol | 31 | +1.72 | 0.55 | 26 | 5 | 83.9 | -0.22 | 0h 44m |
| Nov 2023 | bullish trending low vol | 10 | +0.33 | 0.33 | 7 | 3 | 70.0 | -0.11 | 0h 57m |
| Oct 2023 | bullish trending low vol | 1 | +0.22 | 2.22 | 1 | 0 | 100.0 | 0.0 | 0h 45m |
| Aug 2023 | bearish choppy low vol | 11 | +1.26 | 1.14 | 11 | 0 | 100.0 | -0.19 | 0h 22m |
| Jul 2023 | bullish trending low vol | 14 | +0.57 | 0.41 | 9 | 5 | 64.3 | -0.25 | 1h 26m |
| Jun 2023 | bullish trending low vol | 19 | +2.16 | 1.13 | 18 | 1 | 94.7 | -0.27 | 0h 40m |
| Apr 2023 | bullish trending low vol | 4 | +0.34 | 0.85 | 3 | 1 | 75.0 | -0.17 | 1h 00m |
| Mar 2023 | bullish trending high vol | 7 | +0.37 | 0.53 | 6 | 1 | 85.7 | -0.26 | 0h 54m |
| Feb 2023 | bullish trending low vol | 4 | -0.36 | -0.91 | 2 | 2 | 50.0 | -0.31 | 2h 20m |
| Jan 2023 | bullish trending low vol | 30 | +1.45 | 0.48 | 23 | 7 | 76.7 | -0.47 | 0h 48m |
| Nov 2022 | bearish trending high vol | 20 | +0.50 | 0.25 | 16 | 4 | 80.0 | -0.61 | 0h 40m |
| Oct 2022 | bullish choppy low vol | 12 | +0.30 | 0.25 | 8 | 4 | 66.7 | -0.17 | 0h 56m |
| Sep 2022 | bearish choppy high vol | 2 | -0.23 | -1.14 | 1 | 1 | 50.0 | -0.17 | 1h 38m |
| Aug 2022 | bullish choppy high vol | 11 | +0.97 | 0.88 | 10 | 1 | 90.9 | -0.25 | 0h 44m |
| Jul 2022 | bearish trending high vol | 34 | +1.84 | 0.54 | 28 | 6 | 82.4 | -0.37 | 0h 47m |
| Jun 2022 | bearish trending high vol | 26 | +1.00 | 0.38 | 20 | 6 | 76.9 | -0.64 | 1h 04m |
| May 2022 | bearish trending high vol | 31 | +0.61 | 0.20 | 24 | 7 | 77.4 | -0.7 | 0h 52m |
| Apr 2022 | bearish choppy high vol | 7 | +0.39 | 0.57 | 6 | 1 | 85.7 | -0.22 | 0h 59m |
| Mar 2022 | bullish choppy high vol | 4 | +0.35 | 0.87 | 3 | 1 | 75.0 | -0.01 | 1h 09m |
| Feb 2022 | bearish trending high vol | 19 | +2.03 | 1.07 | 18 | 1 | 94.7 | -0.11 | 0h 23m |
| Jan 2022 | bearish trending high vol | 4 | +0.08 | 0.20 | 2 | 2 | 50.0 | -0.06 | 0h 54m |
| Dec 2021 | bearish trending high vol | 13 | +0.75 | 0.58 | 11 | 2 | 84.6 | -0.24 | 0h 40m |
| Nov 2021 | bullish trending high vol | 6 | +0.83 | 1.39 | 6 | 0 | 100.0 | 0.0 | 0h 17m |
| Oct 2021 | bullish trending high vol | 11 | +0.21 | 0.20 | 9 | 2 | 81.8 | -0.35 | 0h 42m |
| Sep 2021 | bearish trending high vol | 39 | +2.78 | 0.71 | 35 | 4 | 89.7 | -0.2 | 0h 32m |
| Aug 2021 | bullish trending high vol | 34 | +3.48 | 1.03 | 28 | 6 | 82.4 | -0.21 | 0h 38m |
| Jul 2021 | bearish trending high vol | 19 | +1.00 | 0.53 | 15 | 4 | 78.9 | -0.28 | 0h 51m |
| Jun 2021 | bearish trending high vol | 26 | +1.15 | 0.44 | 19 | 7 | 73.1 | -0.63 | 0h 48m |
| May 2021 | bearish trending high vol | 207 | +26.58 | 1.29 | 190 | 17 | 91.8 | -1.66 | 0h 20m |
| Apr 2021 | bearish choppy high vol | 113 | +5.10 | 0.45 | 98 | 15 | 86.7 | -1.82 | 0h 29m |
| Mar 2021 | bullish choppy high vol | 53 | +5.04 | 0.95 | 47 | 6 | 88.7 | -0.28 | 0h 32m |
| Feb 2021 | bullish trending high vol | 166 | +11.83 | 0.71 | 145 | 21 | 87.3 | -0.48 | 0h 27m |
| Jan 2021 | bullish trending high vol | 257 | +23.70 | 0.92 | 232 | 25 | 90.3 | -3.81 | 0h 28m |
Yearly breakdown
| Year | Trades | Profit % | Avg % | Win | Loss | Win % | DD % | Avg dur |
|---|---|---|---|---|---|---|---|---|
| 2025 | 123 | +4.26 | 0.34 | 104 | 19 | 84.6 | -2.4 | 0h 43m |
| 2024 | 193 | +9.79 | 0.51 | 160 | 33 | 82.9 | -0.81 | 0h 47m |
| 2023 | 131 | +8.06 | 0.61 | 106 | 25 | 80.9 | -0.47 | 0h 52m |
| 2022 | 170 | +7.84 | 0.46 | 136 | 34 | 80.0 | -0.7 | 0h 49m |
| 2021 | 944 | +82.45 | 0.87 | 835 | 109 | 88.5 | -3.81 | 0h 28m |
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 · 3 thing(s) worth reviewing before trusting the numbers
| Line | Pattern | Detail | |
|---|---|---|---|
| 179 | review | unused_informative | informative_pairs() declares an extra timeframe, but nothing merges it into the dataframe (no merge_informative_pair, no @informative) -- that data is fetched and discarded, and any higher-timeframe filter you think is running isn't |
| 244 | review | enter_tag_overwrite | enter_tag/exit_tag is written by 3 separate assignments -- they share one column and run in source order, so a row matching more than one condition keeps only the LAST tag. Per-tag statistics won't mean what they appear to |
| 89 | review | unthrottled_candle_processing | process_only_new_candles is False, so populate_indicators/populate_entry_trend/populate_exit_trend re-run every throttle_secs (default 5s) even though their inputs -- closed candles -- haven't changed since the last run. This wastes CPU without changing any value; if the goal is order-book-level checks, put that logic in confirm_trade_entry/custom_exit instead, which already run every loop |
ran by Ron · took s
Lookahead analysis
freqtrade lookahead-analysis: detects strategies peeking at future candles.