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 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | # --- Do not remove these libs --- from datetime import datetime from functools import reduce from typing import Optional, Union from freqtrade.persistence import Trade from freqtrade.strategy import BooleanParameter, CategoricalParameter, DecimalParameter, IntParameter, IStrategy, stoploss_from_open import pandas as pd from pandas import DataFrame import talib.abstract as ta import freqtrade.vendor.qtpylib.indicators as qtpylib import warnings import numpy as np warnings.simplefilter(action='ignore', category=pd.errors.PerformanceWarning) DEBUG = False class ERMD_Strategy_risk(IStrategy): INTERFACE_VERSION: int = 3 can_short = False # enable short direction timeframe = "1d" startup_candle_count = 300 # how many candles we need to skip to start receiving robust signals risk = 0.01 min_pos_pct = 0.01 # minimum position size, percent of current portfolio value max_pos_pct = DecimalParameter(0.01, 0.5, default=0.12, decimals=2, optimize=True, space="buy") # maximum position size, percent of current portfolio value # stop loss stoploss = -0.328 # maximum stop loss distance tsl_break_even = DecimalParameter(0.0, 0.1, default=0.1, decimals=2, optimize=True, space="buy") # place break-even stop loss when desired profit is reached tsl_start_offset = DecimalParameter(0.0, 0.1, default=0.019, decimals=3, optimize=True, space="buy") # start trailing stop loss when this profit level is reached tsl_trailing_distance = DecimalParameter(0.01, 0.2, default=0.07, decimals=2, optimize=True, space="buy") # distance to price exit_profit_only = False trailing_stop = True trailing_stop_positive = 0.01 trailing_stop_positive_offset = 0.093 trailing_only_offset_is_reached = True # take profit tp1_dist = 0.2 tp1_size = 0.3 tp2_dist = 0.4 tp2_size = 0.3 tp3_dist = 0.6 tp3_size = 0.4 minimal_roi = { "0": 0.352, "6663": 0.286, "20273": 0.07, "45493": 0 } # optimized tp # Parameters: signal buy_ema_enabled = BooleanParameter(default=False, optimize=True) buy_ema1_length = IntParameter(3, 100, default=24, optimize=True) buy_ema2_length = IntParameter(3, 100, default=12, optimize=True) buy_ema3_length = IntParameter(3, 100, default=34, optimize=True) buy_rsi_enabled = BooleanParameter(default=False, optimize=True) buy_rsi_length = IntParameter(3, 100, default=12, optimize=True) buy_rsi_threshold = IntParameter(50, 100, default=55, optimize=True) buy_macd_enabled = BooleanParameter(default=False, optimize=True) buy_macd_fast = IntParameter(3, 50, default=41, optimize=True) buy_macd_slow = IntParameter(20, 200, default=74, optimize=True) buy_macd_smooth = IntParameter(1, 30, default=5, optimize=True) buy_candlestick_enabled = BooleanParameter(default=False, optimize=True) sell_ema_enabled = BooleanParameter(default=True, optimize=True) sell_ema1_length = IntParameter(3, 100, default=74, optimize=True) sell_ema2_length = IntParameter(3, 100, default=26, optimize=True) sell_ema3_length = IntParameter(3, 100, default=20, optimize=True) sell_rsi_enabled = BooleanParameter(default=False, optimize=True) sell_rsi_length = IntParameter(3, 100, default=53, optimize=True) sell_rsi_threshold = IntParameter(0, 50, default=27, optimize=True) sell_macd_enabled = BooleanParameter(default=True, optimize=True) sell_macd_fast = IntParameter(3, 50, default=42, optimize=True) sell_macd_slow = IntParameter(20, 200, default=67, optimize=True) sell_macd_smooth = IntParameter(1, 30, default=13, optimize=True) sell_candlestick_enabled = BooleanParameter(default=True, optimize=True) sell_willy_exit = BooleanParameter(default=True, space='sell', optimize=True) sell_high_line = IntParameter(-25, 0, default=-14, space="sell", optimize=True) sell_low_line = IntParameter(-100, -75, default=-94, space="sell", optimize=True) sell_ema = IntParameter(7, 22, default=15, space='sell', optimize=True) sell_willy = IntParameter(15, 30, default=17, space='sell', optimize=True) # signals def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: """ adds indicators to dataframe """ # BUY # EMAs for val in self.buy_ema1_length.range: dataframe[f"buy_ema1_{val}"] = ta.EMA(dataframe, val) for val in self.buy_ema2_length.range: dataframe[f"buy_ema2_{val}"] = ta.EMA(dataframe, val) for val in self.buy_ema3_length.range: dataframe[f"buy_ema3_{val}"] = ta.EMA(dataframe, val) # RSI for val in self.buy_rsi_length.range: dataframe[f"buy_rsi_{val}"] = ta.RSI(dataframe, val) # MACD for fast_val in self.buy_macd_fast.range: for slow_val in self.buy_macd_slow.range: for smooth_val in self.buy_macd_smooth.range: if smooth_val < fast_val < slow_val: macd = ta.MACD(dataframe, fast_val, slow_val, smooth_val) dataframe[f'buy_macd_{fast_val}_{slow_val}_{smooth_val}'] = macd['macd'] dataframe[f'buy_macds_{fast_val}_{slow_val}_{smooth_val}'] = macd['macdsignal'] else: macd = ta.MACD(dataframe, 12, 26, 9) dataframe[f'buy_macd_{fast_val}_{slow_val}_{smooth_val}'] = macd['macd'] dataframe[f'buy_macds_{fast_val}_{slow_val}_{smooth_val}'] = macd['macdsignal'] # SELL # EMAs for val in self.sell_ema1_length.range: dataframe[f"sell_ema1_{val}"] = ta.EMA(dataframe, val) for val in self.sell_ema2_length.range: dataframe[f"sell_ema2_{val}"] = ta.EMA(dataframe, val) for val in self.sell_ema3_length.range: dataframe[f"sell_ema3_{val}"] = ta.EMA(dataframe, val) # RSI for val in self.sell_rsi_length.range: dataframe[f"sell_rsi_{val}"] = ta.RSI(dataframe, val) # MACD for fast_val in self.sell_macd_fast.range: for slow_val in self.sell_macd_slow.range: for smooth_val in self.sell_macd_smooth.range: if smooth_val < fast_val < slow_val: macd = ta.MACD(dataframe, fast_val, slow_val, smooth_val) dataframe[f'sell_macd_{fast_val}_{slow_val}_{smooth_val}'] = macd['macd'] dataframe[f'sell_macds_{fast_val}_{slow_val}_{smooth_val}'] = macd['macdsignal'] else: macd = ta.MACD(dataframe, 12, 26, 9) dataframe[f'sell_macd_{fast_val}_{slow_val}_{smooth_val}'] = macd['macd'] dataframe[f'sell_macds_{fast_val}_{slow_val}_{smooth_val}'] = macd['macdsignal'] for val in self.sell_willy.range: dataframe[f'sell_willy{val}'] = self.willy_ema(dataframe, low_line=-80, up_line=-20, willyLen=val, emaLen=13)[ 'Willy'] for val in self.sell_ema.range: dataframe[f'sell_ema_will{val}'] = \ self.willy_ema(dataframe, low_line=-80, up_line=-20, willyLen=21, emaLen=val)[ 'Ema_will'] # DOJI candlestick pattern doji = ta.CDLDOJI(dataframe) doji_dir = (dataframe["high"] - dataframe["close"]) / (dataframe["close"] - dataframe["low"]) dataframe.loc[((doji == 100) & (doji_dir > 1), "doji")] = dataframe["high"] dataframe.loc[((doji == 100) & (doji_dir < 1), "doji")] = dataframe["low"] # MARUBOZU candlestick pattern body = (dataframe["close"] - dataframe["open"]).abs() wick_top = dataframe["high"] - dataframe[["open", "close"]].max(axis=1) wick_bottom = dataframe[["open", "close"]].min(axis=1) - dataframe["low"] marubozu = (wick_top/body < 0.25) & (wick_bottom/body < 0.25) dataframe.loc[(marubozu & (body > 0), 'marubozu')] = dataframe["high"] dataframe.loc[(marubozu & (body < 0), 'marubozu')] = dataframe["low"] return dataframe def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: """ generate signals """ # BUY signal # only trade if there is volume conditions = [(dataframe['volume'] > 0)] # Close > EMA1 > EMA2 > EMA3 if self.buy_ema_enabled.value: conditions.append((dataframe["close"] > dataframe[f"buy_ema1_{self.buy_ema1_length.value}"]) & (dataframe[f"buy_ema1_{self.buy_ema1_length.value}"] > dataframe[f"buy_ema2_{self.buy_ema2_length.value}"]) & (dataframe[f"buy_ema2_{self.buy_ema2_length.value}"] > dataframe[f"buy_ema3_{self.buy_ema3_length.value}"])) # RSI > RSI_Threshold_Long if self.buy_rsi_enabled: conditions.append(dataframe[f"buy_rsi_{self.buy_rsi_length.value}"] > self.buy_rsi_threshold.value) # MACD cross MACDs above or MACD > 0 if self.buy_macd_enabled.value: macd = dataframe[f'buy_macd_{self.buy_macd_fast.value}_{self.buy_macd_slow.value}_{self.buy_macd_smooth.value}'] macds = dataframe[f'buy_macds_{self.buy_macd_fast.value}_{self.buy_macd_slow.value}_{self.buy_macd_smooth.value}'] conditions.append(qtpylib.crossed_above(macd, macds) | (macd > 0)) # Candlestick patterns: any DOJI and green MARUBOZU if self.buy_candlestick_enabled.value: doji = dataframe['doji'] == dataframe["high"] marubozu = dataframe['marubozu'] == dataframe["high"] conditions.append(doji | marubozu) # combine conditions and return buy_conditions = reduce(lambda x, y: x & y, conditions) dataframe.loc[buy_conditions, 'enter_long'] = 1 # SELL signal # only trade if there is volume conditions = [(dataframe['volume'] > 0)] # Close < EMA1 < EMA2 < EMA3 if self.sell_ema_enabled.value: conditions.append((dataframe["close"] < dataframe[f"sell_ema1_{self.sell_ema1_length.value}"]) & (dataframe[f"sell_ema1_{self.sell_ema1_length.value}"] < dataframe[f"sell_ema2_{self.sell_ema2_length.value}"]) & (dataframe[f"sell_ema2_{self.sell_ema2_length.value}"] < dataframe[f"sell_ema3_{self.sell_ema3_length.value}"])) # RSI < RSI_Threshold_Long if self.sell_rsi_enabled: conditions.append(dataframe[f"sell_rsi_{self.sell_rsi_length.value}"] < self.sell_rsi_threshold.value) # MACD cross MACDs below or MACD < 0 if self.sell_macd_enabled.value: macd = dataframe[f'sell_macd_{self.sell_macd_fast.value}_{self.sell_macd_slow.value}_{self.sell_macd_smooth.value}'] macds = dataframe[f'sell_macds_{self.sell_macd_fast.value}_{self.sell_macd_slow.value}_{self.sell_macd_smooth.value}'] conditions.append(qtpylib.crossed_below(macd, macds) | (macd < 0)) # Candlestick patterns, any DOJI and red MARUBOZU if self.sell_candlestick_enabled.value: doji = dataframe['doji'] == dataframe['low'] marubozu = dataframe['marubozu'] == dataframe['low'] conditions.append(doji | marubozu) # combine conditions and return sell_conditions = reduce(lambda x, y: x & y, conditions) dataframe.loc[sell_conditions, 'enter_short'] = 1 return dataframe def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: if self.sell_willy_exit.value: dataframe.loc[(dataframe[f'sell_ema_will{self.sell_ema.value}'] > self.sell_high_line.value), 'exit_long'] = 1 if self.sell_willy_exit.value: dataframe.loc[(dataframe[f'sell_ema_will{self.sell_ema.value}'] < self.sell_low_line.value), 'exit_short'] = 1 return dataframe stop_info = {} def custom_exit(self, pair: str, trade: 'Trade', current_time: 'datetime', current_rate: float, current_profit: float, **kwargs) -> Optional[Union[str, bool]]: """ exit on EMA3 cross, or exit at entry candle low (long) or high (short) """ dataframe, _ = self.dp.get_analyzed_dataframe(pair=pair, timeframe=self.timeframe) last_candle = dataframe.iloc[-1].squeeze() close = current_rate # exit on EMA20 cross if trade.is_short: ema3 = last_candle[f"sell_ema3_{self.sell_ema3_length.value}"] if close > ema3: if DEBUG: print(f"{pair} EMA20 exit short at {current_time}, price={current_rate}, level={ema3}, profit={current_profit}") return "ema20_cross_exit" else: ema3 = last_candle[f"buy_ema3_{self.buy_ema3_length.value}"] if close < ema3: if DEBUG: print(f"{pair} EMA20 exit long at {current_time}, price={current_rate}, level={ema3}, profit={current_profit}") return "ema20_cross_exit" # exit on entry candle low/high if trade.pair in self.stop_info: if trade.is_short: if close > self.stop_info[trade.pair]["level"]: if DEBUG: print(f"{pair} entry candle high break exit short at {current_time}, price={current_rate}, " f"level={self.stop_info[trade.pair]['level']}, profit={current_profit}") return "candle-based stop_loss" else: if close < self.stop_info[trade.pair]['level']: if DEBUG: print(f"{pair} entry candle low break exit long at {current_time}, price={current_rate}, " f"level={self.stop_info[trade.pair]['level']}, profit={current_profit}") return "candle-based stop_loss" # exit on 3rd take profit, if it sums to 100% if self.tp1_size + self.tp2_size + self.tp3_size == 1: if trade.is_short: ema1 = last_candle[f"sell_ema1_{self.sell_ema1_length.value}"] if close < ema1 * (1-self.tp3_dist): if DEBUG: print(f"{pair} 3rd take profit filled => exit short at {current_time}, price={current_rate}, " f"level={ema1 * (1-self.tp3_dist)}, profit={current_profit}") return "take profit 3" else: ema1 = last_candle[f"buy_ema1_{self.buy_ema1_length.value}"] if close > ema1 * (1+self.tp3_dist): if DEBUG: print(f"{pair} 3rd take profit filled => exit long at {current_time}, price={current_rate}, " f"level={ema1 * (1+self.tp3_dist)}, profit={current_profit}") return "take profit 3" return False # Stop Loss # use_custom_stoploss = True # # def custom_stoploss(self, pair: str, trade: Trade, current_time: datetime, current_rate: float, # current_profit: float, **kwargs) -> float: # """ custom trailing stop loss """ # # if self.tsl_break_even.value <= current_profit < self.tsl_start_offset.value: # return stoploss_from_open(0, current_profit, is_short=trade.is_short) # elif current_profit >= self.tsl_start_offset.value: # return self.tsl_trailing_distance.value # else: # return -1 # Position Size def custom_stake_amount(self, pair: str, current_time: datetime, current_rate: float, proposed_stake: float, min_stake: Optional[float], max_stake: float, leverage: float, entry_tag: Optional[str], side: str, **kwargs) -> float: """ custom position size """ if self.wallets: total = self.wallets.get_total("USDT") else: if DEBUG: print("Wallets are not available, using max_stake instead of portfolio value to calculate position size!") total = max_stake dataframe, _ = self.dp.get_analyzed_dataframe(pair=pair, timeframe=self.timeframe) last_candle = dataframe.iloc[-1].squeeze() if side == "long": level = last_candle["low"] stop_distance = current_rate / level - 1 self.stop_info[pair] = {'level': level} else: level = last_candle["high"] stop_distance = level / current_rate - 1 self.stop_info[pair] = {'level': level} if stop_distance > abs(self.stoploss): if DEBUG: print(f"{pair} at {current_time}: stop distance {round(stop_distance*100)}% is too large, " f"reducing stop loss to {abs(round(self.stoploss*100))}!") stop_distance = abs(self.stoploss) result = total * self.risk / stop_distance if DEBUG: print(f"{pair} at {current_time} position calculation: level={level}; current price={current_rate}; " f"distance={stop_distance}; result={result}; min_stake={min_stake}; max_stake={max_stake}") # apply maximum/minimum position size min_pos = self.min_pos_pct * total max_pos = self.max_pos_pct.value * total if result < min_pos: if DEBUG: print(f"Calculated position ({round(result, 2)}) is less than minimum position size ({round(min_pos)})! Skipping...") return 0 if result > max_pos: if DEBUG: print(f"Calculated position ({round(result, 2)}) is greater than maximum position size ({round(min_pos)})! Reduced!") result = max_pos # check min/max stake if result < min_stake: if DEBUG: print(f"Calculated stake ({round(result,2)}) is less than minimum stake ({min_stake})! Skipping trade...") return 0 elif result > max_stake: if DEBUG: print(f"Calculated stake ({round(result,2)}) is greater than maximum stake ({max_stake})! Reducing to maximum!") result = max_stake return result # Take Profit position_adjustment_enable = True max_entry_position_adjustment = -1 def adjust_trade_position(self, trade: Trade, current_time: datetime, current_rate: float, current_profit: float, min_stake: Optional[float], max_stake: float, current_entry_rate: float, current_exit_rate: float, current_entry_profit: float, current_exit_profit: float, **kwargs) -> Optional[float]: """ custom take profits """ dataframe, _ = self.dp.get_analyzed_dataframe(trade.pair, self.timeframe) if trade.is_short: if trade.nr_of_successful_exits == 0: if current_rate < (1-self.tp1_dist) * dataframe[f"sell_ema1_{self.sell_ema1_length.value}"].iloc[-1].squeeze(): return -trade.amount_requested * self.tp1_size * current_rate if trade.nr_of_successful_exits == 1: if current_rate < (1-self.tp2_dist) * dataframe[f"sell_ema1_{self.sell_ema1_length.value}"].iloc[-1].squeeze(): return -trade.amount_requested * self.tp2_size * current_rate if trade.nr_of_successful_exits == 2: if current_rate < (1-self.tp3_dist) * dataframe[f"sell_ema1_{self.sell_ema1_length.value}"].iloc[-1].squeeze(): if self.tp1_size + self.tp2_size + self.tp3_size != 1: return -trade.amount_requested * self.tp3_size * current_rate else: if trade.nr_of_successful_exits == 0: if current_rate > (1 + self.tp1_dist) * dataframe[f"buy_ema1_{self.buy_ema1_length.value}"].iloc[-1].squeeze(): return -trade.amount_requested * self.tp1_size * current_rate if trade.nr_of_successful_exits == 1: if current_rate > (1 + self.tp2_dist) * dataframe[f"buy_ema1_{self.buy_ema1_length.value}"].iloc[-1].squeeze(): return -trade.amount_requested * self.tp2_size * current_rate if trade.nr_of_successful_exits == 2: if current_rate > (1 + self.tp3_dist) * dataframe[f"buy_ema1_{self.buy_ema1_length.value}"].iloc[-1].squeeze(): if self.tp1_size + self.tp2_size + self.tp3_size != 1: return -trade.amount_requested * self.tp3_size * current_rate return None # set up plotting @property def plot_config(self): plot_config = { 'main_plot': { f"buy_ema1_{self.buy_ema1_length.value}": {}, f"buy_ema2_{self.buy_ema2_length.value}": {}, f"buy_ema3_{self.buy_ema3_length.value}": {}, f"doji": {"type": "scatter"}, f"marubozu": {"type": "scatter"} }, 'subplots': { "MACD": { f'buy_macd_{self.buy_macd_fast.value}_{self.buy_macd_slow.value}_{self.buy_macd_smooth.value}': {}, f'buy_macds_{self.buy_macd_fast.value}_{self.buy_macd_slow.value}_{self.buy_macd_smooth.value}': {}, }, "RSI": { f'buy_rsi_{self.buy_rsi_length.value}': {} } }} return plot_config def willy_ema(self, dataframe: DataFrame, low_line=-80.0, up_line=-20.0, willyLen=21, emaLen=13): def max_help(open, high, low, close): return max(open, high, low, close) def min_help(open, high, low, close): return min(open, high, low, close) df = dataframe.copy() df['highest'] = np.vectorize(max_help)(df['open'], df['high'], df['low'], df['close']) df['lowest'] = np.vectorize(min_help)(df['open'], df['high'], df['low'], df['close']) df['upper'] = df['highest'].rolling(willyLen).max() df['lower'] = df['lowest'].rolling(willyLen).min() df['willy'] = 100 * (df['close'] - df['upper']) / (df['upper'] - df['lower']) df['ema_will'] = ta.EMA(df['willy'], emaLen) # df['ema_willy'] = df.drop(['highest', 'lowest', 'upper', 'lower'], inplace=True, axis=1) df['low_line'] = low_line df['up_line'] = up_line return DataFrame(index=df.index, data={ 'Willy': df['willy'], 'Ema_will': df['ema_will'], 'Low_line': df['low_line'], 'Up_line': df['up_line'] }) def confirm_trade_entry(self, pair: str, order_type: str, amount: float, rate: float, time_in_force: str, current_time: datetime, entry_tag: Optional[str], side: str, **kwargs) -> bool: hal_per = self.wallets.get_total_stake_amount() / 200 usdt_amount = amount * rate if usdt_amount > hal_per: if Debug_Amount: print(f"Amount of trade USDT{usdt_amount} -- (minimal{hal_per})") return True if Debug_Amount: print(f"Trade was rejected ============================>>>>> actual === {usdt_amount} - minimal === {hal_per}") return False |
Strategy League — fixed backtest that feeds the ranking
Export report Freqtrade logsRun finished · took 30.7s
ℹ️ This strategy uses a trailing stop — freqtrade only
re-checks these once per 1d candle by default, not against the price movement within it.
For a more accurate read, re-run this backtest locally with --timeframe-detail 1m
(or 5m — freqtrade's own docs use 5m detail for an hourly strategy as a lighter
alternative). 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 →
- statistically significant edge (p=0.00)
- 100% of resampled runs stayed profitable
- comfortably beat buy-and-hold
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 |
|---|---|---|---|---|---|---|---|---|---|
| Jan 2026 | bullish trending low vol | 2 | -9.10 | -2.26 | 0 | 2 | 0.0 | -20.15 | 192h 00m |
| Dec 2025 | bearish trending low vol | 14 | -113.16 | -3.80 | 1 | 13 | 7.1 | -19.85 | 60h 00m |
| Nov 2025 | bearish trending high vol | 29 | -149.77 | -0.01 | 9 | 20 | 31.0 | -16.02 | 39h 43m |
| Oct 2025 | bearish trending low vol | 25 | -166.66 | -3.46 | 7 | 18 | 28.0 | -10.95 | 83h 31m |
| Sep 2025 | bullish choppy low vol | 42 | +47.57 | 0.75 | 16 | 26 | 38.1 | -9.15 | 138h 51m |
| Aug 2025 | bullish choppy low vol | 53 | -15.50 | -0.79 | 19 | 34 | 35.8 | -7.5 | 96h 27m |
| Jul 2025 | bullish choppy low vol | 82 | +622.08 | 4.87 | 51 | 31 | 62.2 | -26.07 | 80h 47m |
| Jun 2025 | bearish choppy low vol | 33 | -40.07 | -0.83 | 12 | 21 | 36.4 | -23.86 | 76h 22m |
| May 2025 | bullish trending low vol | 66 | +214.67 | 2.29 | 31 | 35 | 47.0 | -30.72 | 129h 49m |
| Apr 2025 | bullish choppy low vol | 16 | -20.71 | 0.74 | 7 | 9 | 43.8 | -32.79 | 64h 30m |
| Mar 2025 | bearish trending high vol | 29 | -248.40 | -6.62 | 3 | 26 | 10.3 | -29.32 | 57h 06m |
| Feb 2025 | bearish trending low vol | 20 | -157.95 | -4.05 | 3 | 17 | 15.0 | -20.51 | 85h 12m |
| Jan 2025 | bearish choppy low vol | 46 | -132.07 | -1.52 | 17 | 29 | 37.0 | -15.16 | 89h 44m |
| Dec 2024 | bullish trending low vol | 74 | +189.62 | 2.51 | 44 | 30 | 59.5 | -10.22 | 74h 36m |
| Nov 2024 | bullish trending low vol | 149 | +1144.66 | 7.69 | 116 | 33 | 77.9 | -11.56 | 44h 47m |
| Oct 2024 | bullish choppy low vol | 54 | +26.11 | 0.07 | 18 | 36 | 33.3 | -13.72 | 97h 47m |
| Sep 2024 | bearish choppy low vol | 32 | +115.79 | 4.86 | 20 | 12 | 62.5 | -19.71 | 120h 45m |
| Aug 2024 | bearish choppy high vol | 45 | -13.92 | -0.55 | 16 | 29 | 35.6 | -22.13 | 86h 56m |
| Jul 2024 | bearish trending low vol | 45 | +39.77 | 0.86 | 16 | 29 | 35.6 | -22.23 | 71h 28m |
| Jun 2024 | bearish choppy low vol | 27 | -51.10 | -3.24 | 6 | 21 | 22.2 | -21.3 | 120h 53m |
| May 2024 | bullish choppy high vol | 38 | -39.35 | -1.48 | 8 | 30 | 21.1 | -17.39 | 86h 32m |
| Apr 2024 | bearish choppy high vol | 30 | -179.13 | -7.58 | 4 | 26 | 13.3 | -14.38 | 116h 48m |
| Mar 2024 | bullish trending high vol | 102 | +313.52 | 4.51 | 68 | 34 | 66.7 | -6.59 | 51h 18m |
| Feb 2024 | bullish trending low vol | 61 | +242.98 | 7.54 | 51 | 10 | 83.6 | -14.05 | 104h 16m |
| Jan 2024 | bearish choppy high vol | 50 | -101.70 | -4.85 | 11 | 39 | 22.0 | -13.32 | 123h 50m |
| Dec 2023 | bullish trending low vol | 87 | +213.03 | 5.67 | 61 | 26 | 70.1 | -2.21 | 83h 35m |
| Nov 2023 | bullish trending low vol | 64 | +100.22 | 4.17 | 44 | 20 | 68.8 | -3.58 | 96h 22m |
| Oct 2023 | bullish trending low vol | 62 | +83.39 | 4.35 | 34 | 28 | 54.8 | -10.18 | 75h 06m |
| Sep 2023 | bearish choppy low vol | 25 | +6.57 | 0.33 | 8 | 17 | 32.0 | -10.63 | 73h 55m |
| Aug 2023 | bearish choppy low vol | 27 | -34.36 | -3.08 | 5 | 22 | 18.5 | -9.75 | 76h 27m |
| Jul 2023 | bullish trending low vol | 67 | +29.96 | 1.57 | 26 | 41 | 38.8 | -8.12 | 102h 27m |
| Jun 2023 | bullish trending low vol | 51 | +29.08 | 1.70 | 20 | 31 | 39.2 | -17.64 | 57h 53m |
| May 2023 | bearish choppy low vol | 21 | -13.42 | -1.62 | 5 | 16 | 23.8 | -15.28 | 80h 00m |
| Apr 2023 | bullish trending low vol | 42 | -6.35 | -0.42 | 13 | 29 | 31.0 | -11.92 | 135h 26m |
| Mar 2023 | bullish trending high vol | 45 | -29.37 | -1.89 | 14 | 31 | 31.1 | -12.67 | 81h 36m |
| Feb 2023 | bullish trending low vol | 51 | +30.73 | 1.52 | 23 | 28 | 45.1 | -3.97 | 118h 07m |
| Jan 2023 | bullish trending low vol | 77 | +132.40 | 7.51 | 58 | 19 | 75.3 | -29.16 | 63h 16m |
| Dec 2022 | bearish trending low vol | 18 | -22.11 | -4.76 | 0 | 18 | 0.0 | -28.96 | 126h 40m |
| Nov 2022 | bearish trending high vol | 40 | -15.71 | -2.12 | 17 | 23 | 42.5 | -25.57 | 72h 00m |
| Oct 2022 | bullish choppy low vol | 42 | +0.69 | 0.77 | 16 | 26 | 38.1 | -25.01 | 80h 34m |
| Sep 2022 | bearish choppy high vol | 31 | -3.56 | -1.33 | 13 | 18 | 41.9 | -22.58 | 62h 43m |
| Aug 2022 | bullish choppy high vol | 39 | -13.46 | -0.88 | 14 | 25 | 35.9 | -19.38 | 134h 09m |
| Jul 2022 | bearish trending high vol | 69 | +40.30 | 2.70 | 38 | 31 | 55.1 | -26.07 | 47h 18m |
| Jun 2022 | bearish trending high vol | 16 | -14.74 | -3.10 | 4 | 12 | 25.0 | -25.7 | 52h 30m |
| May 2022 | bearish trending high vol | 5 | +5.28 | 1.11 | 2 | 3 | 40.0 | -23.3 | 67h 12m |
| Apr 2022 | bearish choppy high vol | 33 | -23.57 | -2.92 | 10 | 23 | 30.3 | -23.47 | 98h 55m |
| Mar 2022 | bullish choppy high vol | 45 | +30.38 | 3.37 | 27 | 18 | 60.0 | -29.69 | 68h 48m |
| Feb 2022 | bearish trending high vol | 46 | -31.67 | -3.12 | 12 | 34 | 26.1 | -25.07 | 49h 34m |
| Jan 2022 | bearish trending high vol | 32 | -19.20 | -1.72 | 13 | 19 | 40.6 | -17.62 | 50h 15m |
| Dec 2021 | bearish trending high vol | 41 | -23.05 | -2.73 | 14 | 27 | 34.1 | -14.18 | 47h 25m |
| Nov 2021 | bullish trending high vol | 60 | +16.68 | 1.33 | 33 | 27 | 55.0 | -8.38 | 84h 00m |
| Oct 2021 | bullish trending high vol | 66 | +39.61 | 2.61 | 37 | 29 | 56.1 | -13.52 | 89h 05m |
| Sep 2021 | bearish trending high vol | 78 | -13.87 | -0.76 | 41 | 37 | 52.6 | -14.01 | 68h 37m |
| Aug 2021 | bullish trending high vol | 111 | +128.85 | 6.30 | 87 | 24 | 78.4 | -16.06 | 57h 57m |
| Jul 2021 | bearish trending high vol | 32 | +5.49 | 2.17 | 16 | 16 | 50.0 | -23.11 | 33h 00m |
| Jun 2021 | bearish trending high vol | 5 | -4.18 | -5.15 | 1 | 4 | 20.0 | -18.75 | 38h 24m |
| May 2021 | bearish trending high vol | 78 | -16.44 | 0.01 | 37 | 41 | 47.4 | -16.97 | 46h 09m |
| Apr 2021 | bearish choppy high vol | 135 | +64.99 | 3.94 | 81 | 54 | 60.0 | -9.52 | 37h 20m |
| Mar 2021 | bullish choppy high vol | 50 | +5.86 | 1.36 | 25 | 25 | 50.0 | -13.89 | 89h 17m |
| Feb 2021 | bullish trending high vol | 130 | +44.72 | 4.10 | 79 | 51 | 60.8 | -12.51 | 38h 24m |
| Jan 2021 | bullish trending high vol | 110 | +20.45 | 2.98 | 68 | 42 | 61.8 | -9.44 | 34h 02m |
Yearly breakdown
| Year | Trades | Profit % | Avg % | Win | Loss | Win % | DD % | Avg dur |
|---|---|---|---|---|---|---|---|---|
| 2026 | 2 | -9.10 | -2.26 | 0 | 2 | 0.0 | -20.15 | 192h 00m |
| 2025 | 455 | -159.97 | 0.09 | 176 | 279 | 38.7 | -32.79 | 90h 40m |
| 2024 | 707 | +1687.25 | 2.56 | 378 | 329 | 53.5 | -22.23 | 79h 38m |
| 2023 | 619 | +541.88 | 2.69 | 311 | 308 | 50.2 | -29.16 | 86h 51m |
| 2022 | 416 | -67.37 | -0.52 | 166 | 250 | 39.9 | -29.69 | 73h 06m |
| 2021 | 896 | +269.11 | 2.55 | 519 | 377 | 57.9 | -23.11 | 53h 17m |
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
2 potential lookahead pattern(s) found · 2 to review
| Line | Pattern | Detail | |
|---|---|---|---|
| 163 | leak | whole_series_reduction | .max() over the whole column sees future rows (use .rolling(window).max() for a causal value) |
| 164 | leak | whole_series_reduction | .min() over the whole column sees future rows (use .rolling(window).min() for a causal value) |
| 386 | review | unbounded_dca | position_adjustment_enable is on but max_entry_position_adjustment is unset (default -1 = unlimited), so nothing caps how many times a losing position can be added to. backtesting.py only bounds entries when that value is > -1 |
| 232 | review | short_without_can_short | writes enter_short, exit_short but can_short isn't True, so freqtrade never opens a short (it also requires futures/margin mode). Worse, freqtrade only takes a long when `not any([exit_long, enter_short])`, so every row you mark enter_short SUPPRESSES that candle's long entry and opens nothing in its place. |
ran by Ron · took s
Lookahead analysis
Freqtrade logsno lookahead bias detected
20 signal(s) analysed · 0 biased entries · 0 biased exits
ran by Ron · took 13.1s