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 | # --- Do not remove these libs --- import numpy as np # noqa import pandas as pd # noqa from pandas import DataFrame # noqa from datetime import datetime # noqa from typing import Optional, Union # noqa from freqtrade.exchange import timeframe_to_prev_date from freqtrade.persistence import Trade from freqtrade.strategy import (BooleanParameter, CategoricalParameter, DecimalParameter, IStrategy, IntParameter) # -------------------------------- # Add your lib to import here import talib.abstract as ta import pandas_ta as pta import freqtrade.vendor.qtpylib.indicators as qtpylib class Ichimoku(IStrategy): INTERFACE_VERSION = 3 timeframe = '4h' USE_TALIB = False # Can this strategy go short? can_short: bool = False minimal_roi = { "0": 5000.0 } stoploss = -0.75 trailing_stop = False process_only_new_candles: bool = True use_exit_signal = True exit_profit_only = False ignore_roi_if_entry_signal = False use_custom_stoploss: bool = True # Number of candles the strategy requires before producing valid signals startup_candle_count: int = 5 # Optional order type mapping. order_types = { 'entry': 'market', 'exit': 'market', 'stoploss': 'market', 'stoploss_on_exchange': False } # Optional order time in force. order_time_in_force = { 'entry': 'gtc', 'exit': 'gtc' } TS = IntParameter(10, 40, default=37, space="buy", optimize=True) KS = IntParameter(30, 120, default=79, space="buy", optimize=True) SS = IntParameter(60, 240, default=86, space="buy", optimize=True) ATR_length = IntParameter(7, 21, default=11, space="buy", optimize=True) ATR_Multip = DecimalParameter(1.0, 6.0, decimals=1, default=1.5, space="buy", optimize=True) rr = DecimalParameter(1.0, 4.0, decimals=1, default=4.0, space="buy", optimize=True) def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: if self.dp.runmode.value in ('live', 'dry_run'): # use TA_LIB for backtest for performance, but avoid for live run for some possible stability issue. self.USE_TALIB = False else: self.USE_TALIB = True ichimo = pta.ichimoku(high=dataframe['high'], low=dataframe['low'], close=dataframe['close'], tenkan=int(self.TS.value), kijun=int(self.KS.value), senkou=int(self.SS.value), include_chikou=True)[0] dataframe['tenkan'] = ichimo[f'ITS_{int(self.TS.value)}'].copy() dataframe['kijun'] = ichimo[f'IKS_{int(self.KS.value)}'].copy() dataframe['senkanA'] = ichimo[f'ISA_{int(self.TS.value)}'].copy() dataframe['senkanB'] = ichimo[f'ISB_{int(self.KS.value)}'].copy() dataframe['chiko'] = ichimo[f'ICS_{int(self.KS.value)}'].copy() dataframe['ATR'] = pta.atr(dataframe['high'], dataframe['low'], dataframe['close'], length=int(self.ATR_length.value), talib=self.USE_TALIB) return dataframe def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[ ( (dataframe['close'] > dataframe['senkanA']) & (dataframe['close'] > dataframe['senkanB']) & (dataframe['close'] > dataframe['tenkan']) & (dataframe['senkanB'] > dataframe['senkanA']) # "cloud is green" & (dataframe['tenkan'] > dataframe['kijun']) ), 'enter_long'] = 1 dataframe.loc[ ( (dataframe['close'] < dataframe['senkanA']) & (dataframe['close'] < dataframe['senkanB']) & (dataframe['close'] < dataframe['tenkan']) & (dataframe['senkanB'] < dataframe['senkanA']) # "cloud is red" & (dataframe['tenkan'] < dataframe['kijun']) ), 'enter_short'] = 1 return dataframe def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[ ( (dataframe['high'] < dataframe['tenkan']) ), 'exit_long'] = 1 dataframe.loc[ ( (dataframe['low'] > dataframe['tenkan']) ), 'exit_short'] = 1 return dataframe def custom_stoploss(self, pair: str, trade: Trade, current_time: datetime, current_rate: float, current_profit: float, **kwargs) -> float: """ Fonction de stop-loss personnalisée """ # Récupération des données analysées pour la paire et le timeframe dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe) # Conversion de la date d'ouverture du trade au format du timeframe trade_date = timeframe_to_prev_date(self.timeframe, trade.open_date_utc) # Récupération de la bougie correspondant à l'ouverture du trade trade_candle = dataframe.loc[dataframe['date'] == trade_date] # Logique de Stop Loss c2 = False if not trade_candle.empty: trade_candle = trade_candle.squeeze() if not trade.is_short: # Pour les positions longues, le SL est placé en dessous du prix d'entrée c2 = current_rate < trade.open_rate - trade_candle['ATR'] * float(self.ATR_Multip.value) else: # Pour les positions courtes, le SL est placé au-dessus du prix d'entrée c2 = current_rate > trade.open_rate + trade_candle['ATR'] * float(self.ATR_Multip.value) if c2: return -0.0001 # Déclenche le stop-loss # Logique de Take Profit c1 = False if not trade_candle.empty: trade_candle = trade_candle.squeeze() dist = trade_candle['ATR'] * self.ATR_Multip.value if not trade.is_short: # Pour les positions longues, le TP est placé au-dessus du prix d'entrée c1 = current_rate > trade.open_rate + dist * float(self.rr.value) else: # Pour les positions courtes, le TP est placé en dessous du prix d'entrée c1 = current_rate < trade.open_rate - dist * float(self.rr.value) if c1: return -0.0001 # Déclenche le take-profit # Si aucune condition n'est remplie, retourne le stop-loss par défaut return self.stoploss |
Strategy League — fixed backtest that feeds the ranking
Export report Freqtrade logsRun finished · took 50.5s
ℹ️ This strategy uses custom_stoploss() — freqtrade only
re-checks these once per 4h 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 →
- did not beat simply holding the market
- statistically significant edge (p=0.00)
- 100% of resampled runs stayed profitable
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 | 23 | -7.33 | -3.19 | 0 | 23 | 0.0 | -10.12 | 36h 10m |
| Nov 2025 | bearish trending high vol | 14 | -7.57 | -5.40 | 2 | 12 | 14.3 | -8.5 | 38h 51m |
| Oct 2025 | bearish trending low vol | 37 | -13.25 | -3.58 | 1 | 36 | 2.7 | -6.82 | 35h 41m |
| Sep 2025 | bullish choppy low vol | 40 | -2.79 | -0.70 | 8 | 32 | 20.0 | -3.88 | 63h 00m |
| Aug 2025 | bullish choppy low vol | 37 | -8.59 | -2.32 | 6 | 31 | 16.2 | -3.27 | 51h 15m |
| Jul 2025 | bullish choppy low vol | 54 | +23.45 | 4.34 | 28 | 26 | 51.9 | -5.41 | 65h 11m |
| Jun 2025 | bearish choppy low vol | 16 | +1.24 | 0.77 | 3 | 13 | 18.8 | -5.48 | 42h 15m |
| May 2025 | bullish trending low vol | 17 | -2.04 | -1.20 | 6 | 11 | 35.3 | -5.23 | 77h 11m |
| Apr 2025 | bullish choppy low vol | 40 | +7.97 | 1.99 | 16 | 24 | 40.0 | -7.05 | 67h 00m |
| Mar 2025 | bearish trending high vol | 22 | -7.49 | -3.41 | 1 | 21 | 4.5 | -6.5 | 75h 16m |
| Feb 2025 | bearish trending low vol | 22 | -8.35 | -3.79 | 1 | 21 | 4.5 | -4.82 | 42h 11m |
| Jan 2025 | bearish choppy low vol | 32 | -12.71 | -3.97 | 2 | 30 | 6.2 | -2.93 | 52h 52m |
| Dec 2024 | bullish trending low vol | 8 | +7.82 | 9.78 | 4 | 4 | 50.0 | -0.19 | 129h 00m |
| Nov 2024 | bullish trending low vol | 51 | +60.47 | 11.85 | 25 | 26 | 49.0 | -1.97 | 69h 20m |
| Oct 2024 | bullish choppy low vol | 35 | -3.39 | -0.97 | 6 | 29 | 17.1 | -3.18 | 66h 17m |
| Sep 2024 | bearish choppy low vol | 38 | +8.54 | 2.25 | 13 | 25 | 34.2 | -5.32 | 84h 38m |
| Aug 2024 | bearish choppy high vol | 39 | +0.53 | 0.14 | 11 | 28 | 28.2 | -4.18 | 59h 17m |
| Jul 2024 | bearish trending low vol | 39 | +0.74 | 0.19 | 12 | 27 | 30.8 | -4.68 | 79h 54m |
| Jun 2024 | bearish choppy low vol | 4 | +0.54 | 1.35 | 2 | 2 | 50.0 | -4.47 | 57h 00m |
| May 2024 | bullish choppy high vol | 49 | -3.55 | -0.72 | 13 | 36 | 26.5 | -4.56 | 69h 58m |
| Apr 2024 | bearish choppy high vol | 28 | -10.48 | -3.75 | 3 | 25 | 10.7 | -3.53 | 43h 26m |
| Mar 2024 | bullish trending high vol | 26 | -0.99 | -0.38 | 6 | 20 | 23.1 | -1.43 | 76h 09m |
| Feb 2024 | bullish trending low vol | 42 | +25.19 | 6.00 | 25 | 17 | 59.5 | -1.11 | 92h 46m |
| Jan 2024 | bearish choppy high vol | 27 | +7.17 | 2.65 | 6 | 21 | 22.2 | -1.75 | 60h 44m |
| Dec 2023 | bullish trending low vol | 46 | +15.85 | 3.44 | 23 | 23 | 50.0 | -0.95 | 72h 57m |
| Nov 2023 | bullish trending low vol | 18 | +20.84 | 11.57 | 14 | 4 | 77.8 | -0.17 | 172h 13m |
| Oct 2023 | bullish trending low vol | 38 | +17.31 | 4.55 | 23 | 15 | 60.5 | -1.95 | 69h 16m |
| Sep 2023 | bearish choppy low vol | 24 | -2.13 | -0.89 | 5 | 19 | 20.8 | -2.71 | 58h 10m |
| Aug 2023 | bearish choppy low vol | 10 | -2.64 | -2.64 | 1 | 9 | 10.0 | -1.62 | 27h 12m |
| Jul 2023 | bullish trending low vol | 30 | +1.90 | 0.63 | 11 | 19 | 36.7 | -0.8 | 101h 44m |
| Jun 2023 | bullish trending low vol | 34 | +14.00 | 4.12 | 11 | 23 | 32.4 | -3.42 | 80h 07m |
| May 2023 | bearish choppy low vol | 17 | -1.81 | -1.06 | 4 | 13 | 23.5 | -2.6 | 38h 35m |
| Apr 2023 | bullish trending low vol | 30 | +6.39 | 2.13 | 9 | 21 | 30.0 | -4.38 | 94h 16m |
| Mar 2023 | bullish trending high vol | 37 | -4.59 | -1.24 | 6 | 31 | 16.2 | -4.84 | 52h 39m |
| Feb 2023 | bullish trending low vol | 18 | -7.38 | -4.10 | 0 | 18 | 0.0 | -2.59 | 32h 40m |
| Jan 2023 | bullish trending low vol | 42 | +32.00 | 7.62 | 28 | 14 | 66.7 | -6.55 | 96h 46m |
| Dec 2022 | bearish trending low vol | 29 | -8.93 | -3.08 | 1 | 28 | 3.4 | -6.45 | 53h 23m |
| Nov 2022 | bearish trending high vol | 39 | -3.94 | -1.01 | 9 | 30 | 23.1 | -3.32 | 66h 09m |
| Oct 2022 | bullish choppy low vol | 27 | +5.64 | 2.09 | 11 | 16 | 40.7 | -5.49 | 60h 36m |
| Sep 2022 | bearish choppy high vol | 26 | -6.98 | -2.69 | 3 | 23 | 11.5 | -6.3 | 61h 51m |
| Aug 2022 | bullish choppy high vol | 27 | -0.36 | -0.13 | 7 | 20 | 25.9 | -1.48 | 94h 04m |
| Jul 2022 | bearish trending high vol | 42 | +15.32 | 3.65 | 15 | 27 | 35.7 | -6.08 | 61h 26m |
| Jun 2022 | bearish trending high vol | 21 | -9.77 | -4.65 | 1 | 20 | 4.8 | -4.34 | 47h 49m |
| May 2022 | bearish trending high vol | 5 | +1.31 | 2.61 | 1 | 4 | 20.0 | -0.75 | 19h 12m |
| Apr 2022 | bearish choppy high vol | 25 | +2.28 | 0.90 | 8 | 17 | 32.0 | -1.23 | 84h 29m |
| Mar 2022 | bullish choppy high vol | 26 | +17.45 | 6.71 | 15 | 11 | 57.7 | -9.05 | 95h 23m |
| Feb 2022 | bearish trending high vol | 34 | -4.46 | -1.31 | 7 | 27 | 20.6 | -7.51 | 59h 46m |
| Jan 2022 | bearish trending high vol | 19 | +0.86 | 0.46 | 5 | 14 | 26.3 | -6.64 | 52h 38m |
| Dec 2021 | bearish trending high vol | 26 | -5.75 | -2.22 | 4 | 22 | 15.4 | -6.17 | 60h 00m |
| Nov 2021 | bullish trending high vol | 38 | -4.28 | -1.13 | 8 | 30 | 21.1 | -4.57 | 34h 38m |
| Oct 2021 | bullish trending high vol | 48 | +6.53 | 1.36 | 18 | 30 | 37.5 | -3.78 | 86h 10m |
| Sep 2021 | bearish trending high vol | 14 | -7.08 | -5.07 | 3 | 11 | 21.4 | -3.54 | 67h 09m |
| Aug 2021 | bullish trending high vol | 35 | +33.79 | 9.66 | 24 | 11 | 68.6 | -2.61 | 112h 21m |
| Jul 2021 | bearish trending high vol | 34 | -1.31 | -0.38 | 7 | 27 | 20.6 | -3.57 | 42h 07m |
| Jun 2021 | bearish trending high vol | 6 | -4.41 | -7.35 | 0 | 6 | 0.0 | -2.91 | 51h 20m |
| May 2021 | bearish trending high vol | 35 | +5.96 | 1.71 | 9 | 26 | 25.7 | -2.7 | 64h 27m |
| Apr 2021 | bearish choppy high vol | 46 | +41.36 | 8.99 | 23 | 23 | 50.0 | -2.04 | 76h 37m |
| Mar 2021 | bullish choppy high vol | 42 | +12.20 | 2.90 | 11 | 31 | 26.2 | -1.79 | 63h 20m |
| Feb 2021 | bullish trending high vol | 34 | +69.89 | 20.55 | 26 | 8 | 76.5 | -2.29 | 109h 25m |
| Jan 2021 | bullish trending high vol | 2 | +5.51 | 27.49 | 1 | 1 | 50.0 | 0.0 | 10h 00m |
Yearly breakdown
| Year | Trades | Profit % | Avg % | Win | Loss | Win % | DD % | Avg dur |
|---|---|---|---|---|---|---|---|---|
| 2025 | 354 | -37.46 | -1.06 | 74 | 280 | 20.9 | -10.12 | 55h 18m |
| 2024 | 386 | +92.59 | 2.40 | 126 | 260 | 32.6 | -5.32 | 72h 20m |
| 2023 | 344 | +89.74 | 2.61 | 135 | 209 | 39.2 | -6.55 | 77h 22m |
| 2022 | 320 | +8.42 | 0.26 | 83 | 237 | 25.9 | -9.05 | 66h 18m |
| 2021 | 360 | +152.41 | 4.23 | 134 | 226 | 37.2 | -6.17 | 71h 41m |
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 | |
|---|---|---|---|
| 106 | 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 lookahead-analysis: detects strategies peeking at future candles.