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 | # MultiMa Strategy V2 # Author: @Mablue (Masoud Azizi) # github: https://github.com/mablue/ # --- Do not remove these libs --- from freqtrade.strategy import IntParameter, IStrategy from pandas import DataFrame # -------------------------------- # Add your lib to import here import talib.abstract as ta import freqtrade.vendor.qtpylib.indicators as qtpylib from functools import reduce import pandas as pd class AIStrategy(IStrategy): # 111/2000: 18 trades. 12/4/2 Wins/Draws/Losses. Avg profit 9.72%. Median profit 3.01%. Total profit 733.01234143 USDT ( 73.30%). Avg duration 2 days, 18:40:00 min. Objective: 1.67048 INTERFACE_VERSION: int = 3 # Buy hyperspace params: buy_params = { "buy_ma_count": 4, "buy_ma_gap": 15, } # Sell hyperspace params: sell_params = { "sell_ma_count": 12, "sell_ma_gap": 68, } # ROI table: minimal_roi = { "0": 0.523, "1553": 0.123, "2332": 0.076, "3169": 0 } # Stoploss: stoploss = -0.30 # Trailing stop: trailing_stop = False # value loaded from strategy trailing_stop_positive = None # value loaded from strategy trailing_stop_positive_offset = 0.0 # value loaded from strategy trailing_only_offset_is_reached = False # value loaded from strategy # Optimal Timeframe timeframe = "5m" count_max = 20 gap_max = 100 buy_ma_count = IntParameter(1, count_max, default=7, space="buy") buy_ma_gap = IntParameter(1, gap_max, default=7, space="buy") sell_ma_count = IntParameter(1, count_max, default=7, space="sell") sell_ma_gap = IntParameter(1, gap_max, default=94, space="sell") def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: periods = set() for ma_count in range(1, int(self.buy_ma_count.value)): periods.add(ma_count * int(self.buy_ma_gap.value)) for ma_count in range(1, int(self.sell_ma_count.value)): periods.add(ma_count * int(self.sell_ma_gap.value)) periods = sorted([p for p in periods if p > 1]) new_cols = {} for p in periods: if p not in dataframe.columns: new_cols[p] = ta.TEMA(dataframe, timeperiod=int(p)) if new_cols: dataframe = pd.concat([dataframe, pd.DataFrame(new_cols)], axis=1) print(" ", metadata['pair'], end="\t\r") return dataframe def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: conditions = [] # I used range(self.buy_ma_count.value) instade of self.buy_ma_count.range # Cuz it returns range(7,8) but we need range(8) for all modes hyperopt, backtest and etc for ma_count in range(self.buy_ma_count.value): key = ma_count*self.buy_ma_gap.value past_key = (ma_count-1)*self.buy_ma_gap.value if past_key > 1 and key in dataframe.keys() and past_key in dataframe.keys(): conditions.append(dataframe[key] < dataframe[past_key]) 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 = [] for ma_count in range(self.sell_ma_count.value): key = ma_count*self.sell_ma_gap.value past_key = (ma_count-1)*self.sell_ma_gap.value if past_key > 1 and key in dataframe.keys() and past_key in dataframe.keys(): conditions.append(dataframe[key] > dataframe[past_key]) 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 301.2s
ℹ️ This strategy uses a trailing stop — 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 →
- profit isn't statistically significant (p=1.00) — hard to tell apart from luck
- only 0% of resampled runs were profitable
- profitable in only 7% of rolling 3-month windows
- did not beat simply holding the market
- very deep drawdown (-91%)
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 |
|---|---|---|---|---|---|---|---|---|---|
| May 2022 | bearish trending high vol | 29 | -2.48 | -0.86 | 10 | 19 | 34.5 | -90.75 | 3h 01m |
| Apr 2022 | bearish choppy high vol | 82 | -0.77 | -0.09 | 23 | 59 | 28.0 | -89.44 | 2h 59m |
| Mar 2022 | bullish choppy high vol | 80 | -4.20 | -0.53 | 28 | 52 | 35.0 | -87.72 | 3h 10m |
| Feb 2022 | bearish trending high vol | 62 | +3.58 | 0.58 | 24 | 38 | 38.7 | -88.89 | 3h 03m |
| Jan 2022 | bearish trending high vol | 90 | -1.02 | -0.11 | 34 | 56 | 37.8 | -87.74 | 3h 15m |
| Dec 2021 | bearish trending high vol | 84 | -1.34 | -0.16 | 34 | 50 | 40.5 | -87.05 | 3h 10m |
| Nov 2021 | bullish trending high vol | 167 | -12.78 | -0.77 | 39 | 128 | 23.4 | -84.76 | 2h 54m |
| Oct 2021 | bullish trending high vol | 207 | -9.53 | -0.46 | 58 | 149 | 28.0 | -72.53 | 3h 14m |
| Sep 2021 | bearish trending high vol | 199 | -0.35 | -0.02 | 75 | 124 | 37.7 | -63.34 | 3h 10m |
| Aug 2021 | bullish trending high vol | 212 | -3.48 | -0.16 | 77 | 135 | 36.3 | -63.08 | 3h 17m |
| Jul 2021 | bearish trending high vol | 165 | -2.23 | -0.14 | 63 | 102 | 38.2 | -59.67 | 3h 23m |
| Jun 2021 | bearish trending high vol | 168 | -4.58 | -0.27 | 51 | 117 | 30.4 | -59.76 | 2h 59m |
| May 2021 | bearish trending high vol | 271 | -16.56 | -0.61 | 85 | 186 | 31.4 | -53.12 | 3h 10m |
| Apr 2021 | bearish choppy high vol | 338 | -15.97 | -0.47 | 107 | 231 | 31.7 | -37.23 | 3h 13m |
| Mar 2021 | bullish choppy high vol | 328 | -6.52 | -0.20 | 122 | 206 | 37.2 | -25.14 | 3h 21m |
| Feb 2021 | bullish trending high vol | 329 | -12.24 | -0.37 | 108 | 221 | 32.8 | -15.63 | 3h 10m |
| Jan 2021 | bullish trending high vol | 420 | +0.11 | 0.00 | 156 | 264 | 37.1 | -16.67 | 3h 51m |
Yearly breakdown
| Year | Trades | Profit % | Avg % | Win | Loss | Win % | DD % | Avg dur |
|---|---|---|---|---|---|---|---|---|
| 2022 | 343 | -4.89 | -0.14 | 119 | 224 | 34.7 | -90.75 | 3h 07m |
| 2021 | 2888 | -85.47 | -0.30 | 975 | 1913 | 33.8 | -87.05 | 3h 18m |
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 | |
|---|---|---|---|
| 18 | review | missing_startup_candles | uses recursive indicators (TEMA) but startup_candle_count is not set (default 0). Their value at a bar depends on all bars before it, so freqtrade trims no warmup and the backtest opens with unwarmed values that can't occur live. Set it to a few times the longest period and confirm with `freqtrade recursive-analysis` |
ran by Ron · took s
Lookahead analysis
freqtrade lookahead-analysis: detects strategies peeking at future candles.