OptimizedIchimokuStrategy
♡
Basics
mode: spot
timeframe: 5m
interface version: 3
outdated
Settings
stoploss: -0.1
has minimal roi
custom stoploss
process only new candles
startup candle count: 100
Methods
custom_stoploss
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 | import numpy as np import pandas as pd from freqtrade.strategy import IStrategy from freqtrade.persistence import Trade from freqtrade.strategy.interface import IStrategy from freqtrade.strategy import merge_informative_pair from freqtrade.strategy import stoploss from pandas import DataFrame from typing import Dict, List, Optional, Tuple class OptimizedIchimokuStrategy(IStrategy): INTERFACE_VERSION = 3 minimal_roi = { "0": 0.1, "30": 0.05, "60": 0.02, "120": 0 } stoploss = -0.10 timeframe = '5m' startup_candle_count: int = 100 process_only_new_candles = True use_custom_stoploss = True def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: # Ichimoku Cloud nine_period_high = dataframe['high'].rolling(window=9).max() nine_period_low = dataframe['low'].rolling(window=9).min() dataframe['tenkan_sen'] = (nine_period_high + nine_period_low) / 2 period26_high = dataframe['high'].rolling(window=26).max() period26_low = dataframe['low'].rolling(window=26).min() dataframe['kijun_sen'] = (period26_high + period26_low) / 2 dataframe['senkou_span_a'] = ((dataframe['tenkan_sen'] + dataframe['kijun_sen']) / 2).shift(26) period52_high = dataframe['high'].rolling(window=52).max() period52_low = dataframe['low'].rolling(window=52).min() dataframe['senkou_span_b'] = ((period52_high + period52_low) / 2).shift(26) dataframe['chikou_span'] = dataframe['close'].shift(-26) # EMA Filters dataframe['ema_50'] = dataframe['close'].ewm(span=50, adjust=False).mean() dataframe['ema_200'] = dataframe['close'].ewm(span=200, adjust=False).mean() return dataframe def populate_buy_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[ (dataframe['close'] > dataframe['senkou_span_a']) & (dataframe['close'] > dataframe['senkou_span_b']) & (dataframe['tenkan_sen'] > dataframe['kijun_sen']) & (dataframe['ema_50'] > dataframe['ema_200']), 'buy'] = 1 return dataframe def populate_sell_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[ (dataframe['close'] < dataframe['senkou_span_a']) & (dataframe['close'] < dataframe['senkou_span_b']) & (dataframe['tenkan_sen'] < dataframe['kijun_sen']) & (dataframe['ema_50'] < dataframe['ema_200']), 'sell'] = 1 return dataframe def custom_stoploss(self, pair: str, trade: Trade, current_time: datetime, current_rate: float, current_profit: float, **kwargs) -> float: if current_profit > 0.05: return -0.02 return -0.10 |
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.