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 | # --- Do not remove these libs --- # --- Do not remove these libs --- from freqtrade.strategy.interface import IStrategy from typing import Dict, List from functools import reduce from pandas import DataFrame # -------------------------------- import talib.abstract as ta import numpy as np import freqtrade.vendor.qtpylib.indicators as qtpylib import datetime from technical.util import resample_to_interval, resampled_merge from datetime import datetime, timedelta from freqtrade.persistence import Trade from freqtrade.strategy import stoploss_from_open, merge_informative_pair, DecimalParameter, IntParameter, CategoricalParameter import technical.indicators as ftt # @Rallipanos # Buy hyperspace params: entry_params = {'base_nb_candles_entry': 14, 'ewo_high': 2.327, 'ewo_high_2': -2.327, 'ewo_low': -20.988, 'low_offset': 0.975, 'low_offset_2': 0.955, 'rsi_entry': 60, 'rsi_entry_2': 45} # Sell hyperspace params: exit_params = {'base_nb_candles_exit': 24, 'high_offset': 0.991, 'high_offset_2': 0.997} 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['low'] * 100 return emadif class RalliV1(IStrategy): INTERFACE_VERSION = 3 # ROI table: minimal_roi = {'0': 0.04, '40': 0.032, '87': 0.018, '201': 0} # Stoploss: stoploss = -0.3 # SMAOffset base_nb_candles_entry = IntParameter(5, 80, default=entry_params['base_nb_candles_entry'], space='entry', optimize=True) base_nb_candles_exit = IntParameter(5, 80, default=exit_params['base_nb_candles_exit'], space='exit', optimize=True) low_offset = DecimalParameter(0.9, 0.99, default=entry_params['low_offset'], space='entry', optimize=True) low_offset_2 = DecimalParameter(0.9, 0.99, default=entry_params['low_offset_2'], space='entry', optimize=True) high_offset = DecimalParameter(0.95, 1.1, default=exit_params['high_offset'], space='exit', optimize=True) high_offset_2 = DecimalParameter(0.99, 1.5, default=exit_params['high_offset_2'], space='exit', optimize=True) # Protection fast_ewo = 50 slow_ewo = 200 ewo_low = DecimalParameter(-20.0, -8.0, default=entry_params['ewo_low'], space='entry', optimize=True) ewo_high = DecimalParameter(2.0, 12.0, default=entry_params['ewo_high'], space='entry', optimize=True) ewo_high_2 = DecimalParameter(-6.0, 12.0, default=entry_params['ewo_high_2'], space='entry', optimize=True) rsi_entry = IntParameter(30, 70, default=entry_params['rsi_entry'], space='entry', optimize=True) rsi_entry_2 = IntParameter(30, 70, default=entry_params['rsi_entry_2'], space='entry', optimize=True) # Trailing stop: trailing_stop = False trailing_stop_positive = 0.005 trailing_stop_positive_offset = 0.03 trailing_only_offset_is_reached = True # Sell signal use_exit_signal = True exit_profit_only = False exit_profit_offset = 0.01 ignore_roi_if_entry_signal = False ## Optional order time in force. order_time_in_force = {'entry': 'gtc', 'exit': 'gtc'} # Optimal timeframe for the strategy timeframe = '5m' inf_1h = '1h' process_only_new_candles = True startup_candle_count = 200 plot_config = {'main_plot': {'ma_entry': {'color': 'orange'}, 'ma_exit': {'color': 'orange'}}} def confirm_trade_exit(self, pair: str, trade: Trade, order_type: str, amount: float, rate: float, time_in_force: str, exit_reason: str, current_time: datetime, **kwargs) -> bool: dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe) last_candle = dataframe.iloc[-1] if last_candle is not None: if exit_reason in ['exit_signal']: if last_candle['rsi'] < 45 and last_candle['hma_50'] > last_candle['ema_100']: #*1.2 return False return True use_custom_stoploss = True def custom_stoploss(self, pair: str, trade: Trade, current_time: datetime, current_rate: float, current_profit: float, **kwargs) -> float: df, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe) candle = df.iloc[-1].squeeze() if current_profit < 0.001 and current_time - timedelta(minutes=140) > trade.open_date_utc: return -0.005 return 1 def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: # Calculate all ma_entry values for val in self.base_nb_candles_entry.range: dataframe[f'ma_entry_{val}'] = ta.EMA(dataframe, timeperiod=val) # Calculate all ma_exit values for val in self.base_nb_candles_exit.range: dataframe[f'ma_exit_{val}'] = ta.EMA(dataframe, timeperiod=val) dataframe['hma_50'] = qtpylib.hull_moving_average(dataframe['close'], window=50) dataframe['hma_9'] = qtpylib.hull_moving_average(dataframe['close'], window=9) dataframe['ema_100'] = ta.EMA(dataframe, timeperiod=100) dataframe['ema_14'] = ta.EMA(dataframe, timeperiod=14) dataframe['sma_9'] = ta.SMA(dataframe, timeperiod=9) dataframe['ema_9'] = ta.EMA(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 def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: conditions = [] conditions.append((dataframe[f'ma_entry_{self.base_nb_candles_entry.value}'] < dataframe['ema_100']) & (dataframe['sma_9'] < dataframe[f'ma_entry_{self.base_nb_candles_entry.value}']) & (dataframe['rsi_fast'] < 35) & (dataframe['rsi_fast'] > 4) & (dataframe['close'] < dataframe[f'ma_entry_{self.base_nb_candles_entry.value}'] * self.low_offset.value) & (dataframe['EWO'] > self.ewo_high.value) & (dataframe['rsi'] < self.rsi_entry_2.value) & (dataframe['volume'] > 0) & (dataframe['close'] < dataframe[f'ma_exit_{self.base_nb_candles_exit.value}'] * self.high_offset.value)) conditions.append((dataframe[f'ma_entry_{self.base_nb_candles_entry.value}'] < dataframe['ema_100']) & (dataframe['sma_9'] < dataframe[f'ma_entry_{self.base_nb_candles_entry.value}']) & (dataframe['rsi_fast'] < 35) & (dataframe['rsi_fast'] > 4) & (dataframe['close'] < dataframe[f'ma_entry_{self.base_nb_candles_entry.value}'] * self.low_offset_2.value) & (dataframe['EWO'] > self.ewo_high_2.value) & (dataframe['rsi'] < self.rsi_entry_2.value) & (dataframe['volume'] > 0) & (dataframe['close'] < dataframe[f'ma_exit_{self.base_nb_candles_exit.value}'] * self.high_offset.value) & (dataframe['rsi'] < 25)) conditions.append((dataframe[f'ma_entry_{self.base_nb_candles_entry.value}'] < dataframe['ema_100']) & (dataframe['sma_9'] < dataframe[f'ma_entry_{self.base_nb_candles_entry.value}']) & (dataframe['rsi_fast'] < 35) & (dataframe['rsi_fast'] > 4) & (dataframe['close'] < dataframe[f'ma_entry_{self.base_nb_candles_entry.value}'] * self.low_offset.value) & (dataframe['EWO'] < self.ewo_low.value) & (dataframe['volume'] > 0) & (dataframe['close'] < dataframe[f'ma_exit_{self.base_nb_candles_exit.value}'] * self.high_offset.value)) conditions.append((dataframe[f'ma_entry_{self.base_nb_candles_entry.value}'] > dataframe['ema_100']) & (dataframe['rsi_fast'] < 35) & (dataframe['rsi_fast'] > 4) & (dataframe['close'] < dataframe[f'ma_entry_{self.base_nb_candles_entry.value}'] * self.low_offset.value) & (dataframe['EWO'] > self.ewo_high.value) & (dataframe['rsi'] < self.rsi_entry.value) & (dataframe['volume'] > 0) & (dataframe['close'] < dataframe[f'ma_exit_{self.base_nb_candles_exit.value}'] * self.high_offset.value)) conditions.append((dataframe[f'ma_entry_{self.base_nb_candles_entry.value}'] > dataframe['ema_100']) & (dataframe['rsi_fast'] < 35) & (dataframe['rsi_fast'] > 4) & (dataframe['close'] < dataframe[f'ma_entry_{self.base_nb_candles_entry.value}'] * self.low_offset_2.value) & (dataframe['EWO'] > self.ewo_high_2.value) & (dataframe['rsi'] < self.rsi_entry.value) & (dataframe['volume'] > 0) & (dataframe['close'] < dataframe[f'ma_exit_{self.base_nb_candles_exit.value}'] * self.high_offset.value) & (dataframe['rsi'] < 25)) conditions.append((dataframe[f'ma_entry_{self.base_nb_candles_entry.value}'] > dataframe['ema_100']) & (dataframe['rsi_fast'] < 35) & (dataframe['rsi_fast'] > 4) & (dataframe['close'] < dataframe[f'ma_entry_{self.base_nb_candles_entry.value}'] * self.low_offset.value) & (dataframe['EWO'] < self.ewo_low.value) & (dataframe['volume'] > 0) & (dataframe['close'] < dataframe[f'ma_exit_{self.base_nb_candles_exit.value}'] * self.high_offset.value)) if conditions: dataframe.loc[reduce(lambda x, y: x | y, conditions), 'enter_long'] = 1 return dataframe def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: conditions = [] conditions.append((dataframe['hma_50'] > dataframe['ema_100']) & (dataframe['close'] > dataframe['sma_9']) & (dataframe['close'] > dataframe[f'ma_exit_{self.base_nb_candles_exit.value}'] * self.high_offset_2.value) & (dataframe['volume'] > 0) & (dataframe['rsi_fast'] > dataframe['rsi_slow']) | (dataframe['close'] < dataframe['ema_100']) & (dataframe['close'] > dataframe[f'ma_exit_{self.base_nb_candles_exit.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'] = 1 return dataframe |
Strategy League — fixed backtest that feeds the ranking
Export report Freqtrade logsRun finished · took 294.3s
ℹ️ This strategy uses a trailing stop / 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 93% 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.32 | 3.24 | 1 | 0 | 100.0 | -0.05 | 0h 35m |
| Nov 2025 | bearish trending high vol | 46 | +2.39 | 0.52 | 31 | 15 | 67.4 | -0.42 | 0h 57m |
| Oct 2025 | bearish trending low vol | 24 | +1.28 | 0.53 | 20 | 4 | 83.3 | -1.01 | 0h 42m |
| Sep 2025 | bullish choppy low vol | 10 | -0.21 | -0.21 | 4 | 6 | 40.0 | -0.17 | 1h 14m |
| Aug 2025 | bullish choppy low vol | 2 | +0.39 | 1.97 | 2 | 0 | 100.0 | 0.0 | 0h 38m |
| Jul 2025 | bullish choppy low vol | 9 | +0.85 | 0.95 | 6 | 3 | 66.7 | -0.14 | 0h 57m |
| Jun 2025 | bearish choppy low vol | 3 | -0.48 | -1.60 | 1 | 2 | 33.3 | -0.16 | 1h 38m |
| May 2025 | bullish trending low vol | 5 | +1.06 | 2.11 | 5 | 0 | 100.0 | -0.13 | 0h 42m |
| Apr 2025 | bullish choppy low vol | 2 | -0.57 | -2.83 | 1 | 1 | 50.0 | -0.29 | 1h 40m |
| Mar 2025 | bearish trending high vol | 7 | +0.46 | 0.66 | 5 | 2 | 71.4 | -0.08 | 1h 18m |
| Feb 2025 | bearish trending low vol | 2 | -0.46 | -2.33 | 1 | 1 | 50.0 | -0.18 | 1h 35m |
| Jan 2025 | bearish choppy low vol | 12 | +1.39 | 1.16 | 9 | 3 | 75.0 | -0.24 | 0h 54m |
| Dec 2024 | bullish trending low vol | 64 | +4.91 | 0.77 | 43 | 21 | 67.2 | -0.39 | 0h 59m |
| Nov 2024 | bullish trending low vol | 110 | +7.77 | 0.71 | 73 | 37 | 66.4 | -0.28 | 0h 59m |
| Oct 2024 | bullish choppy low vol | 11 | +2.32 | 2.11 | 10 | 1 | 90.9 | -0.13 | 1h 08m |
| Aug 2024 | bearish choppy high vol | 2 | +0.22 | 1.08 | 1 | 1 | 50.0 | -0.07 | 0h 52m |
| Jul 2024 | bearish trending low vol | 3 | +0.50 | 1.68 | 3 | 0 | 100.0 | 0.0 | 0h 43m |
| Jun 2024 | bearish choppy low vol | 14 | +3.76 | 2.69 | 13 | 1 | 92.9 | -0.55 | 0h 50m |
| May 2024 | bullish choppy high vol | 1 | +0.22 | 2.21 | 1 | 0 | 100.0 | -0.69 | 0h 45m |
| Apr 2024 | bearish choppy high vol | 8 | -1.49 | -1.86 | 4 | 4 | 50.0 | -0.77 | 1h 29m |
| Mar 2024 | bullish trending high vol | 32 | +4.09 | 1.28 | 26 | 6 | 81.2 | -0.24 | 0h 57m |
| Feb 2024 | bullish trending low vol | 18 | +3.42 | 1.90 | 18 | 0 | 100.0 | 0.0 | 1h 04m |
| Jan 2024 | bearish choppy high vol | 36 | +5.64 | 1.57 | 26 | 10 | 72.2 | -0.41 | 0h 50m |
| Dec 2023 | bullish trending low vol | 37 | +3.58 | 0.97 | 28 | 9 | 75.7 | -0.29 | 1h 00m |
| Nov 2023 | bullish trending low vol | 24 | +1.91 | 0.79 | 17 | 7 | 70.8 | -0.11 | 1h 11m |
| Oct 2023 | bullish trending low vol | 6 | +0.47 | 0.78 | 5 | 1 | 83.3 | -0.34 | 0h 52m |
| Sep 2023 | bearish choppy low vol | 2 | +0.22 | 1.11 | 2 | 0 | 100.0 | -0.34 | 1h 08m |
| Aug 2023 | bearish choppy low vol | 14 | +0.55 | 0.39 | 11 | 3 | 78.6 | -0.73 | 0h 54m |
| Jul 2023 | bullish trending low vol | 15 | +1.25 | 0.84 | 11 | 4 | 73.3 | -0.16 | 1h 01m |
| Jun 2023 | bullish trending low vol | 31 | +2.99 | 0.96 | 23 | 8 | 74.2 | -0.31 | 1h 06m |
| May 2023 | bearish choppy low vol | 3 | +0.27 | 0.90 | 2 | 1 | 66.7 | -0.0 | 1h 38m |
| Apr 2023 | bullish trending low vol | 18 | +3.39 | 1.88 | 16 | 2 | 88.9 | -1.16 | 1h 07m |
| Mar 2023 | bullish trending high vol | 18 | +1.18 | 0.66 | 15 | 3 | 83.3 | -1.71 | 1h 04m |
| Feb 2023 | bullish trending low vol | 7 | +0.00 | 0.00 | 5 | 2 | 71.4 | -1.69 | 1h 07m |
| Jan 2023 | bullish trending low vol | 44 | +1.98 | 0.45 | 29 | 15 | 65.9 | -2.49 | 1h 07m |
| Nov 2022 | bearish trending high vol | 46 | -5.59 | -1.22 | 21 | 25 | 45.7 | -3.24 | 1h 29m |
| Oct 2022 | bullish choppy low vol | 10 | +0.51 | 0.51 | 7 | 3 | 70.0 | -0.4 | 1h 00m |
| Sep 2022 | bearish choppy high vol | 10 | -0.70 | -0.70 | 2 | 8 | 20.0 | -0.55 | 1h 50m |
| Aug 2022 | bullish choppy high vol | 10 | +0.45 | 0.45 | 8 | 2 | 80.0 | -0.48 | 1h 01m |
| Jul 2022 | bearish trending high vol | 30 | +1.73 | 0.58 | 19 | 11 | 63.3 | -0.6 | 0h 59m |
| Jun 2022 | bearish trending high vol | 30 | +1.64 | 0.55 | 20 | 10 | 66.7 | -0.4 | 1h 03m |
| May 2022 | bearish trending high vol | 40 | +3.22 | 0.80 | 28 | 12 | 70.0 | -0.44 | 1h 02m |
| Apr 2022 | bearish choppy high vol | 5 | -0.76 | -1.53 | 2 | 3 | 40.0 | -0.34 | 1h 19m |
| Mar 2022 | bullish choppy high vol | 9 | +1.95 | 2.17 | 8 | 1 | 88.9 | -0.05 | 0h 43m |
| Feb 2022 | bearish trending high vol | 13 | +0.96 | 0.74 | 7 | 6 | 53.8 | -0.27 | 1h 03m |
| Jan 2022 | bearish trending high vol | 5 | +0.38 | 0.76 | 3 | 2 | 60.0 | -0.18 | 1h 02m |
| Dec 2021 | bearish trending high vol | 12 | +1.06 | 0.88 | 8 | 4 | 66.7 | -0.23 | 0h 54m |
| Nov 2021 | bullish trending high vol | 28 | +4.38 | 1.56 | 21 | 7 | 75.0 | -0.18 | 0h 51m |
| Oct 2021 | bullish trending high vol | 23 | +2.77 | 1.20 | 18 | 5 | 78.3 | -0.48 | 0h 48m |
| Sep 2021 | bearish trending high vol | 59 | +6.58 | 1.12 | 42 | 17 | 71.2 | -0.47 | 0h 58m |
| Aug 2021 | bullish trending high vol | 34 | +1.51 | 0.44 | 24 | 10 | 70.6 | -0.68 | 1h 02m |
| Jul 2021 | bearish trending high vol | 25 | -0.86 | -0.34 | 13 | 12 | 52.0 | -0.89 | 1h 20m |
| Jun 2021 | bearish trending high vol | 26 | +2.03 | 0.78 | 22 | 4 | 84.6 | -0.33 | 0h 59m |
| May 2021 | bearish trending high vol | 275 | +32.87 | 1.20 | 206 | 69 | 74.9 | -1.41 | 0h 49m |
| Apr 2021 | bearish choppy high vol | 180 | +25.78 | 1.43 | 141 | 39 | 78.3 | -0.42 | 0h 46m |
| Mar 2021 | bullish choppy high vol | 69 | +8.81 | 1.28 | 55 | 14 | 79.7 | -0.58 | 0h 49m |
| Feb 2021 | bullish trending high vol | 255 | +20.42 | 0.80 | 189 | 66 | 74.1 | -2.69 | 0h 52m |
| Jan 2021 | bullish trending high vol | 329 | +37.43 | 1.14 | 250 | 79 | 76.0 | -6.48 | 0h 46m |
Yearly breakdown
| Year | Trades | Profit % | Avg % | Win | Loss | Win % | DD % | Avg dur |
|---|---|---|---|---|---|---|---|---|
| 2025 | 123 | +6.42 | 0.52 | 86 | 37 | 69.9 | -1.01 | 0h 58m |
| 2024 | 299 | +31.36 | 1.05 | 218 | 81 | 72.9 | -0.77 | 0h 58m |
| 2023 | 219 | +17.79 | 0.81 | 164 | 55 | 74.9 | -2.49 | 1h 05m |
| 2022 | 208 | +3.79 | 0.18 | 125 | 83 | 60.1 | -3.24 | 1h 09m |
| 2021 | 1315 | +142.78 | 1.09 | 989 | 326 | 75.2 | -6.48 | 0h 50m |
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 | |
|---|---|---|---|
| 67 | review | startup_candles_too_small | startup_candle_count is 200, but EMA(timeperiod=100) needing 3x warmup needs at least 300 candles -- so the first 100+ 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 lookahead-analysis: detects strategies peeking at future candles.