6 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 | import datetime import numpy as np import talib.abstract as ta from pandas import DataFrame from datetime import datetime from technical import qtpylib from freqtrade.strategy import IStrategy, IntParameter from scipy.stats import linregress from scipy.signal import argrelextrema from sklearn.preprocessing import MinMaxScaler ''' Usage: freqtrade download-data --config /freqtrade/user_data/config.json --timerange 20240801-20240806 --timeframes 5m freqtrade backtesting --config /freqtrade/user_data/config.json --timerange 20240801-20240806 --strategy EMA_Fibbonaci freqtrade plot-dataframe --config /freqtrade/user_data/config.json --timerange 20240801-20240806 --strategy EMA_Fibbonaci ''' class EMA_Fibbonaci(IStrategy): INTERFACE_VERSION = 3 timeframe = '5m' can_short = True use_exit_signal = True minimal_roi = {} stoploss = -0.99 trailing_stop = False max_open_trades = -1 @property def plot_config(self): plot_config = { 'main_plot' : { 'typ' : {}, '34': { 'color': '#6A6A6A' }, '55': { 'color': '#727272' }, '89': { 'color': '#7A7A7A' }, '144': { 'color': '#828282' }, '233': { 'color': '#8A8A8A' }, }, 'subplots' : { }, } return plot_config def leverage(self, pair: str, current_time: datetime, current_rate: float, proposed_leverage: float, max_leverage: float, entry_tag:str, side: str, **kwargs) -> float: return 10.0 def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe['typ'] = qtpylib.typical_price(dataframe) dataframe['34'] = ta.EMA(dataframe['typ'], 34) dataframe['55'] = ta.EMA(dataframe['typ'], 55) dataframe['89'] = ta.EMA(dataframe['typ'], 89) dataframe['144'] = ta.EMA(dataframe['typ'], 144) dataframe['233'] = ta.EMA(dataframe['typ'], 233) return dataframe def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[ ( (dataframe['typ'] > dataframe['34']) & (dataframe['typ'] > dataframe['55']) & (dataframe['typ'] > dataframe['89']) & (dataframe['typ'] > dataframe['144']) & (dataframe['typ'] > dataframe['233']) ), 'enter_long'] = 1 dataframe.loc[ ( (dataframe['typ'] < dataframe['34']) & (dataframe['typ'] < dataframe['55']) & (dataframe['typ'] < dataframe['89']) & (dataframe['typ'] < dataframe['144']) & (dataframe['typ'] < dataframe['233']) ), 'enter_short'] = 1 return dataframe def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[ ( qtpylib.crossed_below(dataframe['typ'], dataframe['34']) ), 'exit_long'] = 1 dataframe.loc[ ( qtpylib.crossed_above(dataframe['typ'], dataframe['34']) ), 'exit_short'] = 1 return dataframe |
Strategy League — fixed backtest that feeds the ranking
Export report Freqtrade logsRun finished · took 1189.1s
- profit isn't statistically significant (p=0.78) — hard to tell apart from luck
- only 9% of resampled runs were profitable
- did not beat simply holding the market
- very deep drawdown (-94%)
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 |
|---|---|---|---|---|---|---|---|---|---|
| Jan 2021 | bullish trending high vol | 1398 | -90.03 | -0.65 | 330 | 1068 | 23.6 | -94.45 | 1h 17m |
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.
🤖 Not available for FreqAI/ML strategies for now — the sandbox has no model libraries or trained model files (see the Strategy League tab).
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
🤖 Not available for FreqAI/ML strategies for now — the sandbox has no model libraries or trained model files (see the Strategy League tab).
Backtest trust check
no lookahead patterns · 1 thing(s) worth reviewing before trusting the numbers
| Line | Pattern | Detail | |
|---|---|---|---|
| 20 | review | missing_startup_candles | uses recursive indicators (EMA) 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.