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 | # 突破策略 - Donchian Channel # 原理:价格突破 N 日高点买入,跌破 N 日低点卖出 # 适合:趋势市场 from freqtrade.strategy import IStrategy, IntParameter from pandas import DataFrame import talib.abstract as ta from functools import reduce class BreakoutStrategy(IStrategy): INTERFACE_VERSION = 3 # 突破周期 breakout_period = IntParameter(10, 30, default=20, space="buy", optimize=True) minimal_roi = {"0": 0.10} stoploss = -0.05 timeframe = '15m' trailing_stop = True trailing_stop_positive = 0.03 trailing_stop_positive_offset = 0.04 startup_candle_count = 100 order_types = { 'entry': 'limit', 'exit': 'limit', 'stoploss': 'market', 'stoploss_on_exchange': False } def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: period = self.breakout_period.value # Donchian Channel dataframe['don_high'] = dataframe['high'].rolling(period).max() dataframe['don_low'] = dataframe['low'].rolling(period).min() dataframe['don_mid'] = (dataframe['don_high'] + dataframe['don_low']) / 2 # ATR dataframe['atr'] = ta.ATR(dataframe, timeperiod=14) # Volume dataframe['volume_ma'] = dataframe['volume'].rolling(20).mean() return dataframe def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[:, 'enter_long'] = 0 conditions = [ # 价格突破上轨 dataframe['close'] > dataframe['don_high'].shift(1), # 成交量确认 dataframe['volume'] > dataframe['volume_ma'], ] 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: dataframe.loc[:, 'exit_long'] = 0 conditions = [ # 价格跌破下轨 dataframe['close'] < dataframe['don_low'].shift(1), ] 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 116.2s
ℹ️ This strategy uses a trailing stop — freqtrade only
re-checks these once per 15m 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
- did not beat simply holding the market
- very deep drawdown (-90%)
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 |
|---|---|---|---|---|---|---|---|---|---|
| Feb 2021 | bullish trending high vol | 304 | -23.83 | -0.78 | 110 | 194 | 36.2 | -90.23 | 3h 18m |
| Jan 2021 | bullish trending high vol | 795 | -66.32 | -0.83 | 273 | 522 | 34.3 | -72.11 | 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 | |
|---|---|---|---|
| 24 | review | startup_candles_too_small | startup_candle_count is 100, but ATR(timeperiod=14) needing 8x warmup needs at least 112 candles -- so the first 12+ 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.