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 | import freqtrade.vendor.qtpylib.indicators as qtpylib import numpy as np import talib.abstract as ta from freqtrade.strategy.interface import IStrategy from freqtrade.strategy import merge_informative_pair, DecimalParameter, IntParameter, BooleanParameter, CategoricalParameter, stoploss_from_open from pandas import DataFrame from functools import reduce from freqtrade.persistence import Trade from datetime import datetime, timedelta from freqtrade.exchange import timeframe_to_prev_date from technical.indicators import zema ########################################################################################################### ## MultiMA_TSL, modded by stash86, based on SMAOffsetProtectOptV1 (modded by Perkmeister) ## ## Based on @Lamborghini Store's SMAOffsetProtect strat, heavily based on @tirail's original SMAOffset## ## ## ## Strategy for Freqtrade https://github.com/freqtrade/freqtrade ## ## ## ########################################################################################################### # I hope you do enough testing before proceeding, either backtesting and/or dry run. # Any profits and losses are all your responsibility class MultiMA_TSL(IStrategy): INTERFACE_VERSION = 3 buy_params = {'base_nb_candles_buy_ema': 50, 'low_offset_ema': 1.061, 'base_nb_candles_buy_zema': 30, 'low_offset_zema': 0.963, 'rsi_buy_zema': 50, 'base_nb_candles_buy_trima': 14, 'low_offset_trima': 0.963, 'rsi_buy_trima': 50, 'buy_roc_max': 45, 'buy_condition_trima_enable': True, 'buy_condition_zema_enable': True} sell_params = {'base_nb_candles_sell': 32, 'high_offset_ema': 1.002, 'base_nb_candles_sell_trima': 48, 'high_offset_trima': 1.085} # ROI table: minimal_roi = {'0': 100} stoploss = -0.15 # Multi Offset base_nb_candles_sell = IntParameter(5, 80, default=20, space='sell', optimize=False) base_nb_candles_sell_trima = IntParameter(5, 80, default=20, space='sell', optimize=False) high_offset_trima = DecimalParameter(0.99, 1.1, default=1.012, space='sell', optimize=False) base_nb_candles_buy_ema = IntParameter(5, 80, default=20, space='buy', optimize=False) low_offset_ema = DecimalParameter(0.9, 1.1, default=0.958, space='buy', optimize=False) high_offset_ema = DecimalParameter(0.99, 1.1, default=1.012, space='sell', optimize=False) rsi_buy_ema = IntParameter(30, 70, default=61, space='buy', optimize=False) base_nb_candles_buy_trima = IntParameter(5, 80, default=20, space='buy', optimize=False) low_offset_trima = DecimalParameter(0.9, 0.99, default=0.958, space='buy', optimize=False) rsi_buy_trima = IntParameter(30, 70, default=61, space='buy', optimize=False) base_nb_candles_buy_zema = IntParameter(5, 80, default=20, space='buy', optimize=False) low_offset_zema = DecimalParameter(0.9, 0.99, default=0.958, space='buy', optimize=False) rsi_buy_zema = IntParameter(30, 70, default=61, space='buy', optimize=False) buy_condition_enable_optimize = True buy_condition_trima_enable = BooleanParameter(default=True, space='buy', optimize=buy_condition_enable_optimize) buy_condition_zema_enable = BooleanParameter(default=True, space='buy', optimize=buy_condition_enable_optimize) # Protection ewo_low = DecimalParameter(-20.0, -8.0, default=-20.0, space='buy', optimize=False) ewo_high = DecimalParameter(2.0, 12.0, default=6.0, space='buy', optimize=False) fast_ewo = IntParameter(10, 50, default=50, space='buy', optimize=False) slow_ewo = IntParameter(100, 200, default=200, space='buy', optimize=False) buy_roc_max = DecimalParameter(20, 70, default=55, space='buy', optimize=False) buy_peak_max = DecimalParameter(1, 1.1, default=1.03, decimals=3, space='buy', optimize=False) buy_rsi_fast = IntParameter(0, 50, default=35, space='buy', optimize=False) # Trailing stoploss (not used) trailing_stop = False trailing_only_offset_is_reached = True trailing_stop_positive = 0.01 trailing_stop_positive_offset = 0.018 use_custom_stoploss = True # Protection hyperspace params: # value loaded from strategy # value loaded from strategy # value loaded from strategy protection_params = {'low_profit_lookback': 60, 'low_profit_min_req': 0.03, 'low_profit_stop_duration': 29, 'cooldown_lookback': 2, 'stoploss_lookback': 72, 'stoploss_stop_duration': 20} cooldown_lookback = IntParameter(2, 48, default=2, space='protection', optimize=False) low_profit_lookback = IntParameter(2, 60, default=20, space='protection', optimize=False) low_profit_stop_duration = IntParameter(12, 200, default=20, space='protection', optimize=False) low_profit_min_req = DecimalParameter(-0.05, 0.05, default=-0.05, space='protection', decimals=2, optimize=False) @property def protections(self): prot = [] prot.append({'method': 'CooldownPeriod', 'stop_duration_candles': self.cooldown_lookback.value}) prot.append({'method': 'LowProfitPairs', 'lookback_period_candles': self.low_profit_lookback.value, 'trade_limit': 1, 'stop_duration': int(self.low_profit_stop_duration.value), 'required_profit': self.low_profit_min_req.value}) return prot # Optimal timeframe for the strategy. timeframe = '5m' # Run "populate_indicators()" only for new candle. process_only_new_candles = True # These values can be overridden in the "ask_strategy" section in the config. use_exit_signal = True exit_profit_only = False ignore_roi_if_entry_signal = False # Number of candles the strategy requires before producing valid signals startup_candle_count: int = 200 #credit to Perkmeister for this custom stoploss to help the strategy ride a green candle when the sell signal triggered def custom_stoploss(self, pair: str, trade: 'Trade', current_time: datetime, current_rate: float, current_profit: float, **kwargs) -> float: sl_new = 1 if not self.config['runmode'].value in ('backtest', 'hyperopt'): dataframe, _ = self.dp.get_analyzed_dataframe(pair, self.timeframe) if len(dataframe) >= 1: last_candle = dataframe.iloc[-1] if (last_candle['sell_copy'] == 1) & (last_candle['buy_copy'] == 0): sl_new = 0.001 return sl_new def get_ticker_indicator(self): return int(self.timeframe[:-1]) def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: # EWO dataframe['ewo'] = EWO(dataframe, self.fast_ewo.value, self.slow_ewo.value) # RSI dataframe['rsi'] = ta.RSI(dataframe, timeperiod=14) dataframe['rsi_fast'] = ta.RSI(dataframe, timeperiod=4) dataframe['roc_max'] = dataframe['close'].pct_change(48).rolling(12).max() * 100 return dataframe def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: conditions = [] dataframe['ema_offset_buy'] = ta.EMA(dataframe, int(self.base_nb_candles_buy_ema.value)) * self.low_offset_ema.value dataframe['zema_offset_buy'] = zema(dataframe, int(self.base_nb_candles_buy_zema.value)) * self.low_offset_zema.value dataframe['trima_offset_buy'] = ta.TRIMA(dataframe, int(self.base_nb_candles_buy_trima.value)) * self.low_offset_trima.value dataframe.loc[:, 'enter_tag'] = '' dataframe.loc[:, 'buy_copy'] = 0 dataframe.loc[:, 'enter_long'] = 0 buy_offset_trima = self.buy_condition_trima_enable.value & (dataframe['close'] < dataframe['trima_offset_buy']) & ((dataframe['ewo'] < self.ewo_low.value) | (dataframe['ewo'] > self.ewo_high.value) & (dataframe['rsi'] < self.rsi_buy_trima.value)) dataframe.loc[buy_offset_trima, 'enter_tag'] += 'trima ' conditions.append(buy_offset_trima) buy_offset_zema = self.buy_condition_zema_enable.value & (dataframe['close'] < dataframe['zema_offset_buy']) & ((dataframe['ewo'] < self.ewo_low.value) | (dataframe['ewo'] > self.ewo_high.value) & (dataframe['rsi'] < self.rsi_buy_zema.value)) dataframe.loc[buy_offset_zema, 'enter_tag'] += 'zema ' conditions.append(buy_offset_zema) add_check = (dataframe['rsi_fast'] < self.buy_rsi_fast.value) & (dataframe['close'] < dataframe['ema_offset_buy']) & (dataframe['volume'] > 0) if conditions: dataframe.loc[add_check & reduce(lambda x, y: x | y, conditions), ['buy_copy', 'enter_long']] = (1, 1) return dataframe def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[:, 'sell_copy'] = 0 dataframe['ema_offset_sell'] = ta.EMA(dataframe, int(self.base_nb_candles_sell.value)) * self.high_offset_ema.value dataframe['trima_offset_sell'] = ta.TRIMA(dataframe, int(self.base_nb_candles_sell_trima.value)) * self.high_offset_trima.value conditions = [] conditions.append((dataframe['close'] > dataframe['ema_offset_sell']) & (dataframe['volume'] > 0)) conditions.append((dataframe['close'] > dataframe['trima_offset_sell']) & (dataframe['volume'] > 0)) if conditions: dataframe.loc[reduce(lambda x, y: x | y, conditions), ['sell_copy', 'exit_long']] = (1, 1) if not self.config['runmode'].value in ('backtest', 'hyperopt'): dataframe.loc[:, 'exit_long'] = 0 return dataframe # Elliot Wave Oscillator def EWO(dataframe, sma1_length=5, sma2_length=35): df = dataframe.copy() sma1 = ta.EMA(df, timeperiod=sma1_length) sma2 = ta.EMA(df, timeperiod=sma2_length) smadif = (sma1 - sma2) / df['close'] * 100 return smadif |
Strategy League — fixed backtest that feeds the ranking
Export report Freqtrade logsRun finished · took 272.7s
ℹ️ 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 88% 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 |
|---|---|---|---|---|---|---|---|---|---|
| Nov 2025 | bearish trending high vol | 23 | +1.87 | 0.81 | 17 | 6 | 73.9 | -0.66 | 1h 12m |
| Oct 2025 | bearish trending low vol | 13 | +20.95 | 16.10 | 10 | 3 | 76.9 | -0.09 | 1h 05m |
| Sep 2025 | bullish choppy low vol | 5 | +0.09 | 0.18 | 2 | 3 | 40.0 | -0.31 | 1h 22m |
| Jul 2025 | bullish choppy low vol | 1 | +0.12 | 1.16 | 1 | 0 | 100.0 | -0.24 | 1h 45m |
| Jun 2025 | bearish choppy low vol | 2 | -0.14 | -0.71 | 1 | 1 | 50.0 | -0.3 | 1h 52m |
| May 2025 | bullish trending low vol | 2 | +0.44 | 2.18 | 2 | 0 | 100.0 | -0.34 | 0h 40m |
| Apr 2025 | bullish choppy low vol | 1 | -0.65 | -6.48 | 0 | 1 | 0.0 | -0.44 | 4h 35m |
| Mar 2025 | bearish trending high vol | 2 | +0.20 | 1.02 | 2 | 0 | 100.0 | -0.16 | 0h 12m |
| Dec 2024 | bullish trending low vol | 21 | +1.54 | 0.73 | 17 | 4 | 81.0 | -0.23 | 1h 02m |
| Nov 2024 | bullish trending low vol | 39 | +2.46 | 0.63 | 27 | 12 | 69.2 | -1.08 | 1h 20m |
| Aug 2024 | bearish choppy high vol | 1 | +0.15 | 1.53 | 1 | 0 | 100.0 | -1.15 | 1h 20m |
| Apr 2024 | bearish choppy high vol | 3 | -1.86 | -6.20 | 1 | 2 | 33.3 | -1.23 | 1h 38m |
| Mar 2024 | bullish trending high vol | 3 | +0.14 | 0.48 | 2 | 1 | 66.7 | -0.43 | 1h 02m |
| Feb 2024 | bullish trending low vol | 3 | +0.54 | 1.79 | 3 | 0 | 100.0 | -0.62 | 0h 40m |
| Dec 2023 | bullish trending low vol | 4 | -0.22 | -0.56 | 1 | 3 | 25.0 | -0.82 | 2h 10m |
| Aug 2023 | bearish choppy low vol | 5 | -0.38 | -0.76 | 4 | 1 | 80.0 | -0.74 | 0h 55m |
| Jul 2023 | bullish trending low vol | 9 | +1.51 | 1.67 | 8 | 1 | 88.9 | -0.01 | 1h 37m |
| Jun 2023 | bullish trending low vol | 5 | +1.00 | 2.00 | 5 | 0 | 100.0 | 0.0 | 0h 25m |
| Apr 2023 | bullish trending low vol | 2 | +0.30 | 1.47 | 2 | 0 | 100.0 | 0.0 | 1h 58m |
| Mar 2023 | bullish trending high vol | 1 | +0.22 | 2.21 | 1 | 0 | 100.0 | 0.0 | 0h 30m |
| Feb 2023 | bullish trending low vol | 1 | -0.05 | -0.50 | 0 | 1 | 0.0 | -0.03 | 1h 45m |
| Jan 2023 | bullish trending low vol | 14 | +1.29 | 0.92 | 10 | 4 | 71.4 | -0.18 | 1h 35m |
| Nov 2022 | bearish trending high vol | 7 | +0.08 | 0.12 | 4 | 3 | 57.1 | -0.37 | 1h 49m |
| Oct 2022 | bullish choppy low vol | 8 | +0.24 | 0.31 | 4 | 4 | 50.0 | -0.11 | 1h 18m |
| Aug 2022 | bullish choppy high vol | 1 | -0.20 | -1.98 | 0 | 1 | 0.0 | -0.1 | 1h 50m |
| Jul 2022 | bearish trending high vol | 9 | +1.31 | 1.46 | 7 | 2 | 77.8 | -0.11 | 1h 06m |
| Jun 2022 | bearish trending high vol | 10 | -0.02 | -0.02 | 7 | 3 | 70.0 | -0.4 | 1h 42m |
| May 2022 | bearish trending high vol | 8 | +1.16 | 1.44 | 7 | 1 | 87.5 | -0.43 | 1h 28m |
| Apr 2022 | bearish choppy high vol | 1 | +0.09 | 0.94 | 1 | 0 | 100.0 | -0.07 | 0h 50m |
| Feb 2022 | bearish trending high vol | 12 | +2.52 | 2.10 | 10 | 2 | 83.3 | -0.11 | 0h 48m |
| Dec 2021 | bearish trending high vol | 4 | +0.17 | 0.42 | 4 | 0 | 100.0 | -0.1 | 0h 58m |
| Nov 2021 | bullish trending high vol | 2 | +0.15 | 0.76 | 2 | 0 | 100.0 | -0.15 | 0h 35m |
| Oct 2021 | bullish trending high vol | 5 | -0.18 | -0.37 | 4 | 1 | 80.0 | -0.56 | 2h 28m |
| Sep 2021 | bearish trending high vol | 11 | +1.19 | 1.08 | 9 | 2 | 81.8 | -0.21 | 1h 11m |
| Aug 2021 | bullish trending high vol | 11 | +2.04 | 1.85 | 10 | 1 | 90.9 | -0.01 | 0h 54m |
| Jul 2021 | bearish trending high vol | 4 | +0.65 | 1.63 | 3 | 1 | 75.0 | -0.12 | 1h 58m |
| Jun 2021 | bearish trending high vol | 7 | +0.14 | 0.21 | 5 | 2 | 71.4 | -0.29 | 1h 49m |
| May 2021 | bearish trending high vol | 88 | +62.02 | 7.05 | 76 | 12 | 86.4 | -2.26 | 0h 56m |
| Apr 2021 | bearish choppy high vol | 54 | +3.56 | 0.66 | 41 | 13 | 75.9 | -1.27 | 1h 09m |
| Mar 2021 | bullish choppy high vol | 24 | +4.18 | 1.75 | 22 | 2 | 91.7 | -0.47 | 0h 50m |
| Feb 2021 | bullish trending high vol | 77 | +9.86 | 1.28 | 63 | 14 | 81.8 | -1.35 | 0h 56m |
| Jan 2021 | bullish trending high vol | 127 | +11.13 | 0.88 | 99 | 28 | 78.0 | -5.54 | 1h 05m |
Yearly breakdown
| Year | Trades | Profit % | Avg % | Win | Loss | Win % | DD % | Avg dur |
|---|---|---|---|---|---|---|---|---|
| 2025 | 49 | +22.88 | 4.66 | 35 | 14 | 71.4 | -0.66 | 1h 14m |
| 2024 | 70 | +2.97 | 0.42 | 51 | 19 | 72.9 | -1.23 | 1h 13m |
| 2023 | 41 | +3.67 | 0.89 | 31 | 10 | 75.6 | -0.82 | 1h 25m |
| 2022 | 56 | +5.18 | 0.93 | 40 | 16 | 71.4 | -0.43 | 1h 19m |
| 2021 | 414 | +94.91 | 2.29 | 338 | 76 | 81.6 | -5.54 | 1h 03m |
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-bias patterns detected
ran by Ron · took s
Lookahead analysis
freqtrade lookahead-analysis: detects strategies peeking at future candles.