strategy
♡
Basics
mode: spot
timeframe: 4h
outdated
Settings
stoploss: -0.345
has minimal roi
trailing
hyperopt
hyperopt params: 4
Indicators
TEMA
talib
Concepts
trailing
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 | from freqtrade.strategy.hyper import IntParameter from freqtrade.strategy.interface import IStrategy from pandas import DataFrame import talib.abstract as ta import freqtrade.vendor.qtpylib.indicators as qtpylib from functools import reduce class strategy(IStrategy): buy_params = { "buy_ma_count": 4, "buy_ma_gap": 15, } sell_params = { "sell_ma_count": 12, "sell_ma_gap": 68, } minimal_roi = { "0": 0.523, "1553": 0.123, "2332": 0.076, "3169": 0 } stoploss = -0.345 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 timeframe = "4h" 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: for count in range(self.count_max): for gap in range(self.gap_max): if count*gap > 1 and count*gap not in dataframe.keys(): dataframe[count*gap] = ta.TEMA( dataframe, timeperiod=int(count*gap) ) print(" ", metadata['pair'], end="\t\r") return dataframe def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: conditions = [] 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), "buy"] = 1 return dataframe def populate_sell_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), "sell"] = 1 |
Strategy League — fixed backtest that feeds the ranking
The fixed-params backtest (33 pairs · 20210101-20260101) — the only run that feeds the Strategy League ranking.
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
Static source analysis — instant, does not run the strategy. Flags future-data leaks, backtest-realism problems, and indicators worth a second look.
Lookahead analysis
freqtrade lookahead-analysis: detects strategies peeking at future candles.