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 | import datetime import numpy as np import talib.abstract as ta from pandas import DataFrame from datetime import datetime from technical import qtpylib from freqtrade.strategy import IStrategy from scipy.signal import argrelextrema class BadoV1(IStrategy): INTERFACE_VERSION = 3 timeframe = '15m' can_short = True minimal_roi = { '0': 1 } stoploss = -0.999 trailing_stop = False max_open_trades = -1 @property def plot_config(self): plot_config = { 'main_plot' : {}, 'subplots' : {}, } plot_config['main_plot']['maxima'] = { 'plotly': { 'mode': 'markers', 'marker': { 'size': 8, 'line': { 'width': 2 }, 'color': 'green' } } } plot_config['main_plot']['minima'] = { 'plotly': { 'mode': 'markers', 'marker': { 'size': 8, 'line': { 'width': 2 }, 'color': 'red' } } } return plot_config def leverage(self, pair: str, current_time: datetime, current_rate: float, proposed_leverage: float, max_leverage: float, entry_tag:str, side: str, **kwargs) -> float: return 10.0 def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: rolling_window = 64 dataframe['rolling_max'] = dataframe['close'].rolling(window=rolling_window).max() dataframe['rolling_min'] = dataframe['close'].rolling(window=rolling_window).min() order = 5 # Window size for finding local extrema maxima_idx = argrelextrema(dataframe['close'].values, np.greater, order=order)[0] minima_idx = argrelextrema(dataframe['close'].values, np.less, order=order)[0] dataframe['maxima'] = np.nan dataframe['minima'] = np.nan dataframe.loc[maxima_idx, 'maxima'] = dataframe.loc[maxima_idx, 'close'] dataframe.loc[minima_idx, 'minima'] = dataframe.loc[minima_idx, 'close'] return dataframe def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[ ( (dataframe['minima'].notnull()) ), 'enter_long'] = 1 dataframe.loc[ ( (dataframe['maxima'].notnull()) ), 'enter_short'] = 1 return dataframe def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[ ( (dataframe['maxima'].notnull()) ), 'exit_long'] = 1 dataframe.loc[ ( (dataframe['minima'].notnull()) ), 'exit_short'] = 1 return dataframe |
Strategy League — fixed backtest that feeds the ranking
Export report Freqtrade logsRun finished · took 806.5s
- freqtrade's lookahead-analysis confirmed this strategy uses future candles — the backtest numbers can't be trusted
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 | 10 | +1.37 | 1.38 | 8 | 2 | 80.0 | -0.0 | 2h 08m |
| Dec 2025 | bearish trending low vol | 3100 | +3096.04 | 10.02 | 2971 | 129 | 95.8 | -0.0 | 2h 24m |
| Nov 2025 | bearish trending high vol | 3053 | +4351.02 | 14.32 | 2972 | 81 | 97.3 | -0.0 | 2h 21m |
| Oct 2025 | bearish trending low vol | 3010 | +4389.57 | 14.65 | 2912 | 98 | 96.7 | -0.0 | 2h 28m |
| Sep 2025 | bullish choppy low vol | 2819 | +2864.28 | 10.22 | 2724 | 95 | 96.6 | -0.01 | 2h 33m |
| Aug 2025 | bearish choppy low vol | 3116 | +3837.94 | 12.38 | 3027 | 89 | 97.1 | -0.0 | 2h 24m |
| Jul 2025 | bullish choppy low vol | 3009 | +4135.92 | 13.79 | 2924 | 85 | 97.2 | -0.0 | 2h 28m |
| Jun 2025 | bearish choppy low vol | 2763 | +3139.37 | 11.40 | 2685 | 78 | 97.2 | -0.0 | 2h 36m |
| May 2025 | bullish trending low vol | 3065 | +4003.32 | 13.10 | 2971 | 94 | 96.9 | -0.0 | 2h 26m |
| Apr 2025 | bullish choppy low vol | 2933 | +4079.33 | 13.96 | 2845 | 88 | 97.0 | -0.0 | 2h 27m |
| Mar 2025 | bearish trending high vol | 3030 | +4663.29 | 15.45 | 2937 | 93 | 96.9 | -0.0 | 2h 27m |
| Feb 2025 | bearish trending low vol | 2749 | +5181.58 | 18.92 | 2681 | 68 | 97.5 | -0.01 | 2h 26m |
| Jan 2025 | bearish choppy low vol | 3084 | +4803.39 | 15.65 | 2976 | 108 | 96.5 | -0.01 | 2h 25m |
| Dec 2024 | bullish trending low vol | 3222 | +5961.74 | 18.59 | 3136 | 86 | 97.3 | -0.01 | 2h 18m |
| Nov 2024 | bullish trending low vol | 2991 | +5889.39 | 19.76 | 2925 | 66 | 97.8 | -0.01 | 2h 24m |
| Oct 2024 | bullish choppy low vol | 3079 | +3131.51 | 10.21 | 2982 | 97 | 96.8 | -0.0 | 2h 25m |
| Sep 2024 | bearish choppy low vol | 2917 | +3025.49 | 10.41 | 2817 | 100 | 96.6 | -0.0 | 2h 28m |
| Aug 2024 | bearish choppy high vol | 2953 | +4143.28 | 14.09 | 2860 | 93 | 96.9 | -0.02 | 2h 31m |
| Jul 2024 | bearish trending low vol | 2900 | +3656.07 | 12.65 | 2810 | 90 | 96.9 | -0.01 | 2h 34m |
| Jun 2024 | bearish choppy low vol | 2855 | +2915.73 | 10.26 | 2763 | 92 | 96.8 | -0.0 | 2h 31m |
| May 2024 | bullish choppy high vol | 3072 | +3410.64 | 11.17 | 3000 | 72 | 97.7 | -0.0 | 2h 25m |
| Apr 2024 | bearish choppy high vol | 3045 | +4665.98 | 15.37 | 2954 | 91 | 97.0 | -0.01 | 2h 21m |
| Mar 2024 | bullish trending high vol | 3170 | +6029.15 | 19.09 | 3088 | 82 | 97.4 | -0.03 | 2h 21m |
| Feb 2024 | bullish trending low vol | 2836 | +3323.87 | 11.76 | 2749 | 87 | 96.9 | -0.0 | 2h 27m |
| Jan 2024 | bearish choppy high vol | 2958 | +4027.37 | 13.66 | 2871 | 87 | 97.1 | -0.0 | 2h 31m |
| Dec 2023 | bullish trending low vol | 3017 | +3952.74 | 13.12 | 2903 | 114 | 96.2 | -0.01 | 2h 28m |
| Nov 2023 | bullish trending low vol | 2966 | +4272.11 | 14.43 | 2876 | 90 | 97.0 | -0.0 | 2h 26m |
| Oct 2023 | bullish trending low vol | 2954 | +2647.44 | 8.98 | 2834 | 120 | 95.9 | -0.01 | 2h 31m |
| Sep 2023 | bearish choppy low vol | 2687 | +1850.14 | 6.90 | 2579 | 108 | 96.0 | -0.0 | 2h 41m |
| Aug 2023 | bearish choppy low vol | 2969 | +2344.19 | 7.91 | 2836 | 133 | 95.5 | -0.01 | 2h 30m |
| Jul 2023 | bullish trending low vol | 3085 | +2911.71 | 9.45 | 2991 | 94 | 97.0 | -0.01 | 2h 25m |
| Jun 2023 | bullish trending low vol | 2903 | +3229.24 | 11.14 | 2798 | 105 | 96.4 | -0.01 | 2h 29m |
| May 2023 | bearish choppy low vol | 2922 | +2077.58 | 7.12 | 2805 | 117 | 96.0 | -0.01 | 2h 32m |
| Apr 2023 | bullish trending low vol | 2998 | +3106.97 | 10.38 | 2882 | 116 | 96.1 | -0.0 | 2h 24m |
| Mar 2023 | bullish trending high vol | 3146 | +4324.18 | 13.76 | 3056 | 90 | 97.1 | -0.01 | 2h 22m |
| Feb 2023 | bullish trending low vol | 2632 | +3013.14 | 11.46 | 2538 | 94 | 96.4 | -0.01 | 2h 33m |
| Jan 2023 | bullish trending low vol | 2931 | +3595.88 | 12.28 | 2821 | 110 | 96.2 | -0.03 | 2h 33m |
| Dec 2022 | bearish trending low vol | 2791 | +2218.91 | 7.96 | 2636 | 155 | 94.4 | -0.01 | 2h 40m |
| Nov 2022 | bearish trending high vol | 2920 | +4959.13 | 17.00 | 2823 | 97 | 96.7 | -0.01 | 2h 27m |
| Oct 2022 | bullish choppy low vol | 3082 | +2881.81 | 9.36 | 2971 | 111 | 96.4 | -0.01 | 2h 25m |
| Sep 2022 | bearish choppy high vol | 2840 | +3864.98 | 13.63 | 2746 | 94 | 96.7 | -0.01 | 2h 32m |
| Aug 2022 | bullish choppy high vol | 3041 | +4301.42 | 14.17 | 2952 | 89 | 97.1 | -0.01 | 2h 26m |
| Jul 2022 | bullish trending high vol | 3027 | +4615.51 | 15.26 | 2938 | 89 | 97.1 | -0.01 | 2h 28m |
| Jun 2022 | bearish trending high vol | 2954 | +6523.65 | 22.11 | 2858 | 96 | 96.8 | -0.01 | 2h 25m |
| May 2022 | bearish trending high vol | 3220 | +7499.85 | 23.36 | 3137 | 83 | 97.4 | -0.02 | 2h 17m |
| Apr 2022 | bearish choppy high vol | 2945 | +3636.92 | 12.45 | 2853 | 92 | 96.9 | -0.01 | 2h 27m |
| Mar 2022 | bullish choppy high vol | 3097 | +4345.75 | 14.16 | 3014 | 83 | 97.3 | -0.01 | 2h 24m |
| Feb 2022 | bearish trending high vol | 2856 | +4935.07 | 17.34 | 2755 | 101 | 96.5 | -0.02 | 2h 21m |
| Jan 2022 | bearish trending high vol | 3059 | +5179.81 | 17.02 | 2949 | 110 | 96.4 | -0.03 | 2h 26m |
| Dec 2021 | bearish trending high vol | 3220 | +5647.70 | 17.62 | 3143 | 77 | 97.6 | -0.01 | 2h 18m |
| Nov 2021 | bearish trending high vol | 3087 | +5284.84 | 17.28 | 3008 | 79 | 97.4 | -0.01 | 2h 20m |
| Oct 2021 | bullish trending high vol | 3332 | +5230.67 | 15.82 | 3256 | 76 | 97.7 | -0.01 | 2h 14m |
| Sep 2021 | bearish trending high vol | 3260 | +6647.85 | 20.47 | 3190 | 70 | 97.9 | -0.04 | 2h 12m |
| Aug 2021 | bullish trending high vol | 3168 | +6683.52 | 21.16 | 3106 | 62 | 98.0 | -0.02 | 2h 21m |
| Jul 2021 | bullish trending high vol | 3091 | +5489.55 | 17.80 | 3000 | 91 | 97.1 | -0.02 | 2h 24m |
| Jun 2021 | bearish trending high vol | 2979 | +8054.39 | 27.10 | 2912 | 67 | 97.8 | -0.03 | 2h 24m |
| May 2021 | bearish trending high vol | 3150 | +11928.84 | 38.00 | 3073 | 77 | 97.6 | -0.05 | 2h 17m |
| Apr 2021 | bearish choppy high vol | 3114 | +8791.10 | 28.36 | 3049 | 65 | 97.9 | -0.07 | 2h 18m |
| Mar 2021 | bullish choppy high vol | 3117 | +6337.05 | 20.41 | 3041 | 76 | 97.6 | -0.08 | 2h 23m |
| Feb 2021 | bullish trending high vol | 2880 | +9047.47 | 31.51 | 2794 | 86 | 97.0 | -0.61 | 2h 19m |
| Jan 2021 | bullish trending high vol | 3130 | +9455.23 | 30.26 | 3049 | 81 | 97.4 | -2.78 | 2h 21m |
Yearly breakdown
| Year | Trades | Profit % | Avg % | Win | Loss | Win % | DD % | Avg dur |
|---|---|---|---|---|---|---|---|---|
| 2026 | 10 | +1.37 | 1.38 | 8 | 2 | 80.0 | 0.0 | 2h 08m |
| 2025 | 35731 | +48545.05 | 13.64 | 34625 | 1106 | 96.9 | -0.01 | 2h 27m |
| 2024 | 35998 | +50180.22 | 13.99 | 34955 | 1043 | 97.1 | -0.03 | 2h 26m |
| 2023 | 35210 | +37325.32 | 10.62 | 33919 | 1291 | 96.3 | -0.03 | 2h 29m |
| 2022 | 35832 | +54962.81 | 15.39 | 34632 | 1200 | 96.7 | -0.03 | 2h 26m |
| 2021 | 37528 | +88598.21 | 23.70 | 36621 | 907 | 97.6 | -2.78 | 2h 19m |
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 · 2 thing(s) worth reviewing before trusting the numbers
⚠️ Reading the code found no leak, but Lookahead analysis — which actually runs the strategy on truncated data and compares the signals — did. Trust that one: static analysis can't see a leak that only appears at runtime, which is why this strategy isn't ranked.
| Line | Pattern | Detail | |
|---|---|---|---|
| 65 | review | repaint_indicator | 'argrelextrema' repaints -- compares each bar against `order` bars on BOTH sides. Fine if you shift the result forward by `order`, or if it builds ML training labels; a leak if the raw value is traded at the bar it marks. |
| 66 |
ran by Ron · took s
Lookahead analysis
Freqtrade logsLOOKAHEAD BIAS DETECTED
20 signal(s) analysed · 0 biased entries · 0 biased exits
🔮 Where these flagged columns appear in the code — click a row to jump to that line (heuristic: name match, so it may not be the exact offending line):
| Line | Flagged column |
|---|---|
| 81 | enter_long |
| 87 | enter_short |
| 96 | exit_long |
| 102 | exit_short |
| 32 | maxima |
| 68 | maxima |
| 71 | maxima |
| 85 | maxima |
| 94 | maxima |
| 42 | minima |
| 69 | minima |
| 72 | minima |
| 79 | minima |
| 100 | minima |
ran by Ron · took 475.2s