Basics
mode: futures
timeframe: 5m
interface version: 3
Settings
stoploss: -0.1
has minimal roi
process only new candles
startup candle count: 120
Indicators
ATR
EMA
RSI
talib
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 | from freqtrade.strategy import IStrategy from pandas import DataFrame import talib.abstract as ta class TrendGuardStrategy(IStrategy): INTERFACE_VERSION = 3 timeframe = "5m" can_short = True process_only_new_candles = True startup_candle_count = 120 use_exit_signal = True position_adjustment_enable = False minimal_roi = {"0": 0.035, "60": 0.018, "180": 0.0} stoploss = -0.1000 def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe["ema_fast"] = ta.EMA(dataframe, timeperiod=12) dataframe["ema_slow"] = ta.EMA(dataframe, timeperiod=48) dataframe["rsi"] = ta.RSI(dataframe, timeperiod=14) dataframe["atr"] = ta.ATR(dataframe, timeperiod=14) dataframe["volume_mean"] = dataframe["volume"].rolling(30).mean() dataframe["trend_strength"] = ( dataframe["ema_fast"] - dataframe["ema_slow"] ) / dataframe["close"] return dataframe def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: long_condition = ( (dataframe["ema_fast"] > dataframe["ema_slow"]) & (dataframe["rsi"] > 52) & (dataframe["rsi"] < 72) & (dataframe["volume"] > dataframe["volume_mean"]) ) dataframe.loc[long_condition, "enter_long"] = 1 if self.can_short: short_condition = ( (dataframe["ema_fast"] < dataframe["ema_slow"]) & (dataframe["rsi"] < 48) & (dataframe["rsi"] > 28) & (dataframe["volume"] > dataframe["volume_mean"]) ) dataframe.loc[short_condition, "enter_short"] = 1 return dataframe def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: exit_long = ( (dataframe["ema_fast"] < dataframe["ema_slow"]) | (dataframe["rsi"] > 78) ) dataframe.loc[exit_long, "exit_long"] = 1 if self.can_short: exit_short = ( (dataframe["ema_fast"] > dataframe["ema_slow"]) | (dataframe["rsi"] < 22) ) dataframe.loc[exit_short, "exit_short"] = 1 return dataframe |
Strategy League — fixed backtest that feeds the ranking
Export report Freqtrade logsRun finished · took 770.5s
pairs 33 pairs
timerange 20210101-20260101
mode futures
timeframe 5m
stake 100 USDT
wallet 1000 USDT
max open trades 10
fee exchange lowest tier
total profit-89.91%
final wallet101 USDT
win rate47.8%
max drawdown-95.91%
market change+447.44%
vs market-537.35%
timeframe5m
profit factor0.98
expectancy ratio-0.011
break-even fee0.0913%
sharpe-4.702
sortino-6.8
CAGR-36.8%
calmar-0.981
avg MFE+1.56%
avg MAE-1.40%
avg profit/trade-0.02%
avg duration1h 41m
best trade+3.57%
worst trade-10.48%
win/loss streak113 / 37
positive months7/21
consistent (3-mo)21.1%
worst 3-mo-125.94%
trades53578
revision1
likely annual return-73%
range (5th–95th)-86% … -51%
chance of profit0.1%
worst-5% outcome-88%
significance (p)0.969
risk of ruin0.0%
- profit isn't statistically significant (p=0.97) — hard to tell apart from luck
- only 0% of resampled runs were profitable
- profitable in only 21% of rolling 3-month windows
- did not beat simply holding the market
- very deep drawdown (-96%)
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 |
|---|---|---|---|---|---|---|---|---|---|
| Sep 2022 | bearish choppy high vol | 213 | -3.95 | -0.19 | 84 | 129 | 39.4 | -95.91 | 1h 55m |
| Aug 2022 | bullish choppy high vol | 505 | -9.71 | -0.20 | 193 | 312 | 38.2 | -94.63 | 1h 53m |
| Jul 2022 | bullish trending high vol | 856 | -6.37 | -0.08 | 374 | 482 | 43.7 | -90.44 | 1h 47m |
| Jun 2022 | bearish trending high vol | 1034 | +5.88 | 0.06 | 512 | 522 | 49.5 | -91.19 | 1h 42m |
| May 2022 | bearish trending high vol | 872 | +0.09 | 0.00 | 418 | 454 | 47.9 | -91.33 | 1h 41m |
| Apr 2022 | bearish choppy high vol | 758 | -4.00 | -0.06 | 321 | 437 | 42.3 | -91.4 | 1h 53m |
| Mar 2022 | bullish choppy high vol | 1040 | -8.76 | -0.08 | 423 | 617 | 40.7 | -88.91 | 1h 53m |
| Feb 2022 | bearish trending high vol | 1083 | +2.09 | 0.02 | 492 | 591 | 45.4 | -88.04 | 1h 49m |
| Jan 2022 | bearish trending high vol | 1285 | -6.33 | -0.05 | 585 | 700 | 45.5 | -86.87 | 1h 49m |
| Dec 2021 | bearish trending high vol | 1875 | -5.15 | -0.03 | 842 | 1033 | 44.9 | -83.63 | 1h 48m |
| Nov 2021 | bearish trending high vol | 2119 | -22.80 | -0.11 | 914 | 1205 | 43.1 | -81.3 | 1h 51m |
| Oct 2021 | bullish trending high vol | 3312 | -39.58 | -0.12 | 1399 | 1913 | 42.2 | -72.92 | 1h 51m |
| Sep 2021 | bearish trending high vol | 4215 | -43.90 | -0.11 | 1902 | 2313 | 45.1 | -56.15 | 1h 41m |
| Aug 2021 | bullish trending high vol | 4160 | -42.46 | -0.11 | 1806 | 2354 | 43.4 | -38.33 | 1h 46m |
| Jul 2021 | bullish trending high vol | 3951 | -32.49 | -0.08 | 1745 | 2206 | 44.2 | -22.86 | 1h 51m |
| Jun 2021 | bearish trending high vol | 4179 | +15.34 | 0.04 | 2103 | 2076 | 50.3 | -10.52 | 1h 41m |
| May 2021 | bearish trending high vol | 4701 | +124.57 | 0.27 | 2759 | 1942 | 58.7 | -49.18 | 1h 24m |
| Apr 2021 | bearish choppy high vol | 4230 | -8.91 | -0.02 | 2095 | 2135 | 49.5 | -43.76 | 1h 35m |
| Mar 2021 | bullish choppy high vol | 4060 | -39.43 | -0.10 | 1785 | 2275 | 44.0 | -36.31 | 1h 48m |
| Feb 2021 | bullish trending high vol | 4331 | +19.89 | 0.05 | 2308 | 2023 | 53.3 | -38.95 | 1h 32m |
| Jan 2021 | bullish trending high vol | 4799 | +16.07 | 0.03 | 2533 | 2266 | 52.8 | -26.6 | 1h 31m |
Yearly breakdown
| Year | Trades | Profit % | Avg % | Win | Loss | Win % | DD % | Avg dur |
|---|---|---|---|---|---|---|---|---|
| 2022 | 7646 | -31.06 | -0.04 | 3402 | 4244 | 44.5 | -95.91 | 1h 48m |
| 2021 | 45932 | -58.85 | -0.01 | 22191 | 23741 | 48.3 | -83.63 | 1h 40m |
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 | |
|---|---|---|---|
| 12 | review | startup_candles_too_small | startup_candle_count is 120, but EMA(timeperiod=48) needing 3x warmup needs at least 144 candles -- so the first 24+ 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.