M1ATrendValidationStrategy
♡
Basics
mode: spot
timeframe: 1d
Settings
stoploss: -0.99
has minimal roi
process only new candles
startup candle count: 220
Methods
_atr
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 | """M1A trend validation port for Freqtrade feasibility checks. This frozen historical reproduction mirrors the fixed BTC/ETH 1d spot trend rule that already failed the project's self-managed M1A validation. It is not an active strategy candidate and must not receive new strategy features. It is not approved for live use, paper use with real credentials, hyperopt, leverage, futures, FreqAI, or rescue parameter tuning. It exists only to check whether Freqtrade can host an equivalent research strategy skeleton. Freqtrade's backtest fill model is framework-defined and is not asserted here to be identical to the project's strict next-open time-semantics checks. """ from __future__ import annotations from functools import reduce import pandas as pd from freqtrade.strategy import IStrategy class M1ATrendValidationStrategy(IStrategy): timeframe = "1d" can_short = False startup_candle_count = 220 minimal_roi = {"0": 100} stoploss = -0.99 process_only_new_candles = True use_exit_signal = True ignore_roi_if_entry_signal = True regime_window = 200 entry_window = 55 exit_window = 20 atr_window = 20 atr_stop_mult = 2.0 @staticmethod def _atr(dataframe: pd.DataFrame, window: int) -> pd.Series: previous_close = dataframe["close"].shift(1) ranges = pd.concat( [ dataframe["high"] - dataframe["low"], (dataframe["high"] - previous_close).abs(), (dataframe["low"] - previous_close).abs(), ], axis=1, ) return ranges.max(axis=1).rolling(window).mean() def populate_indicators(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame: dataframe["sma_200"] = dataframe["close"].rolling(self.regime_window).mean() dataframe["prior_donchian_high_55"] = dataframe["high"].shift(1).rolling(self.entry_window).max() dataframe["prior_donchian_low_20"] = dataframe["low"].shift(1).rolling(self.exit_window).min() dataframe["atr_20"] = self._atr(dataframe, self.atr_window) dataframe["atr_stop_reference"] = dataframe["close"] - self.atr_stop_mult * dataframe["atr_20"] return dataframe def populate_entry_trend(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame: allowed_pairs = {"BTC/USDT", "ETH/USDT"} pair = metadata.get("pair") conditions = [ dataframe["volume"] > 0, dataframe["close"] > dataframe["sma_200"], dataframe["close"] > dataframe["prior_donchian_high_55"], ] dataframe.loc[:, "enter_long"] = 0 if pair in allowed_pairs: dataframe.loc[reduce(lambda left, right: left & right, conditions), "enter_long"] = 1 return dataframe def populate_exit_trend(self, dataframe: pd.DataFrame, metadata: dict) -> pd.DataFrame: conditions = [ dataframe["volume"] > 0, dataframe["close"] < dataframe["prior_donchian_low_20"], ] dataframe.loc[:, "exit_long"] = 0 dataframe.loc[reduce(lambda left, right: left & right, conditions), "exit_long"] = 1 return dataframe |
Strategy League — fixed backtest that feeds the ranking
Export report Freqtrade logsRun finished · took 10.5s
pairs 33 pairs
timerange 20210101-20260101
mode spot
timeframe 1d
stake 100 USDT
wallet 1000 USDT
max open trades 10
fee exchange lowest tier
total profit+39.52%
final wallet1395 USDT
win rate54.2%
max drawdown-3.04%
market change+403.38%
vs market-363.86%
timeframe1d
profit factor5.16
expectancy ratio1.909
break-even fee8.3341%
sharpe0.089
sortino0.77
CAGR+6.9%
calmar13.594
avg MFE+49.55%
avg MAE-6.61%
avg profit/trade16.47%
avg duration1399h 00m
best trade+214.30%
worst trade-18.65%
win/loss streak3 / 5
positive months8/17
consistent (3-mo)80.0%
worst 3-mo-2.78%
trades24
revision1
likely annual return+7%
range (5th–95th)+1% … +15%
chance of profit99.5%
worst-5% outcome+1%
significance (p)0.0275
risk of ruin0.0%
- did not beat simply holding the market
- 100% of resampled runs stayed profitable
- profitable across 80% 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 |
|---|---|---|---|---|---|---|---|---|---|
| Sep 2025 | bullish choppy low vol | 1 | +4.19 | 42.00 | 1 | 0 | 100.0 | 0.0 | 1776h 00m |
| Aug 2025 | bullish choppy low vol | 2 | -1.34 | -6.71 | 0 | 2 | 0.0 | -2.32 | 408h 00m |
| Jun 2025 | bearish choppy low vol | 2 | -1.37 | -6.83 | 1 | 1 | 50.0 | -1.35 | 552h 00m |
| Feb 2025 | bearish trending low vol | 1 | +3.62 | 36.22 | 1 | 0 | 100.0 | 0.0 | 3168h 00m |
| Dec 2024 | bullish trending low vol | 1 | +1.51 | 15.14 | 1 | 0 | 100.0 | 0.0 | 984h 00m |
| Jun 2024 | bearish choppy low vol | 1 | -0.79 | -7.90 | 0 | 1 | 0.0 | -0.59 | 504h 00m |
| May 2024 | bullish choppy high vol | 1 | +1.67 | 16.69 | 1 | 0 | 100.0 | 0.0 | 1896h 00m |
| Mar 2024 | bullish trending high vol | 1 | +6.66 | 66.64 | 1 | 0 | 100.0 | 0.0 | 3240h 00m |
| Jan 2024 | bearish choppy high vol | 1 | +1.94 | 19.41 | 1 | 0 | 100.0 | -1.52 | 2184h 00m |
| Aug 2023 | bearish choppy low vol | 1 | -1.63 | -16.28 | 0 | 1 | 0.0 | -3.04 | 840h 00m |
| Jul 2023 | bullish trending low vol | 1 | -0.29 | -2.92 | 0 | 1 | 0.0 | -1.76 | 792h 00m |
| Jun 2023 | bullish trending low vol | 2 | -0.86 | -4.29 | 0 | 2 | 0.0 | -1.53 | 1980h 00m |
| Mar 2023 | bullish trending high vol | 1 | -1.10 | -10.94 | 0 | 1 | 0.0 | -0.86 | 504h 00m |
| Feb 2023 | bullish trending low vol | 2 | +1.49 | 7.47 | 2 | 0 | 100.0 | -0.55 | 684h 00m |
| Nov 2021 | bullish trending high vol | 2 | -0.15 | -0.75 | 1 | 1 | 50.0 | -1.07 | 864h 00m |
| Sep 2021 | bearish trending high vol | 2 | -0.30 | -1.52 | 1 | 1 | 50.0 | -0.95 | 1080h 00m |
| May 2021 | bearish trending high vol | 2 | +26.25 | 131.22 | 2 | 0 | 100.0 | 0.0 | 3276h 00m |
Yearly breakdown
| Year | Trades | Profit % | Avg % | Win | Loss | Win % | DD % | Avg dur |
|---|---|---|---|---|---|---|---|---|
| 2025 | 6 | +5.10 | 8.52 | 3 | 3 | 50.0 | -2.32 | 1144h 00m |
| 2024 | 5 | +10.99 | 22.00 | 4 | 1 | 80.0 | -1.52 | 1761h 36m |
| 2023 | 7 | -2.39 | -3.40 | 2 | 5 | 28.6 | -3.04 | 1066h 17m |
| 2021 | 6 | +25.80 | 42.98 | 4 | 2 | 66.7 | -1.07 | 1740h 00m |
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