Basics
mode: spot
timeframe: 1d
interface version: 3
Settings
stoploss: -1.0
has minimal roi
process only new candles
startup candle count: 30
Indicators
Ichimoku
pandas_ta
talib
technical
Concepts
breakout
trend_following
Methods
plot_config
7 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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | # ============================================================================================== # Chikou breakout STRONG strategy for Spot # # Made by: # ______ _ _ _____ _ ______ _ # | _ \ | | | | / __ \ | | | _ \ | | # | | | | _ _ | |_ ___ | |__ | / \/ _ __ _ _ _ __ | |_ ___ | | | | __ _ __| | # | | | || | | || __|/ __|| '_ \ | | | '__|| | | || '_ \ | __|/ _ \ | | | |/ _` | / _` | # | |/ / | |_| || |_| (__ | | | || \__/\| | | |_| || |_) || |_| (_) || |/ /| (_| || (_| | # |___/ \__,_| \__|\___||_| |_| \____/|_| \__, || .__/ \__|\___/ |___/ \__,_| \__,_| # __/ || | # |___/ |_| # Version : 1.0 # Date : 2023-05 # Remarks : # As published, explained and tested in my Youtube video: # In my spot config I had to comment out SHIB and SAND to make Ichimoku work. # # Visit my site for more information: https://www.dutchalgotrading.com/ # Become my Patron: https://www.patreon.com/dutchalgotrading # - # - # ============================================================================================== # --- Used commands for later reference --- # source .env/bin/activate # freqtrade --version # freqtrade new-config # freqtrade new-strategy --strategy <strategyname> # freqtrade test-pairlist -c user_data/futures_config.json # freqtrade download-data -c user_data/futures_config.json --timerange 20170606- -t 1d 4h 1h 30m 15m 5m 1m # freqtrade backtesting -c user_data/futures_config.json -s chikou_breakout_strong_f --timerange=20190101-20210530 --timeframe=1d # freqtrade backtesting-analysis # freqtrade plot-dataframe -p BTC/USDT --strategy chikou_breakout_strong_f -c user_data/futures_config.json # # pragma pylint: disable=missing-docstring, invalid-name, pointless-string-statement # flake8: noqa: F401 # isort: skip_file # --- Do not remove these libs --- import numpy as np import pandas as pd from pandas import DataFrame from datetime import datetime from typing import Optional, Union from freqtrade.strategy import ( BooleanParameter, CategoricalParameter, DecimalParameter, IntParameter, IStrategy, merge_informative_pair, ) # -------------------------------- # Add your lib to import here import talib.abstract as ta import pandas_ta as pta from technical import qtpylib class chikou_breakout_strong_s(IStrategy): # Strategy interface version - allow new iterations of the strategy interface. # Check the documentation or the Sample strategy to get the latest version. INTERFACE_VERSION = 3 # Proposed timeframe for the strategy. Can be altered to your own preferred timeframe. timeframe = "1d" # Can this strategy go short? can_short: bool = False # Minimal ROI designed for the strategy. # Set to 10000% since the exit signal determines the trade exit. # Some crypto even got ROI triggered at 100% so had to set it to this value. minimal_roi = {"0": 100.0} # Optimal stoploss designed for the strategy. # Set to 100% since the exit signal dermines the trade exit. stoploss = -1.0 # Trailing stoploss trailing_stop = False # Run "populate_indicators()" only for new candle. process_only_new_candles = True # These values can be overridden in the config. use_exit_signal = True exit_profit_only = False ignore_roi_if_entry_signal = False # Number of candles the strategy requires before producing valid signals # Set to the default of 30. startup_candle_count: int = 30 # Optional order type mapping. order_types = { "entry": "limit", "exit": "limit", "stoploss": "market", "stoploss_on_exchange": False, } # Optional order time in force. order_time_in_force = {"entry": "GTC", "exit": "GTC"} @property def plot_config(self): return { "main_plot": { "chikou": {"color": "yellow"}, 'senkou_a': { 'color': 'green', 'fill_to': 'senkou_b', 'fill_label': 'Ichimoku Cloud', 'fill_color': 'rgba(255,76,46,0.2)', }, 'senkou_b': {} } } def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: # CREATE ICHIMOKU INDICATOR # Specify the lenghts for each indicator (20, 60, 120, 60 is for crypto trading) TS = 9 KS = 26 SS = 52 CS = 26 OS = 0 # Each column represents the output of the First Ichimoku Variable tuple and its specific column. dataframe["tenkan"] = pta.ichimoku( high=dataframe["high"], low=dataframe["low"], close=dataframe["close"], tenkan=TS, kijun=KS, senkou=SS, offset=OS, )[0][f"ITS_{TS}"] dataframe["kijun"] = pta.ichimoku( high=dataframe["high"], low=dataframe["low"], close=dataframe["close"], tenkan=TS, kijun=KS, senkou=SS, offset=OS, )[0][f"IKS_{KS}"] dataframe["senkou_a"] = pta.ichimoku( high=dataframe["high"], low=dataframe["low"], close=dataframe["close"], tenkan=TS, kijun=KS, senkou=SS, offset=OS, )[0][f"ISA_{TS}"] dataframe["senkou_b"] = pta.ichimoku( high=dataframe["high"], low=dataframe["low"], close=dataframe["close"], tenkan=TS, kijun=KS, senkou=SS, offset=OS, )[0][f"ISB_{KS}"] dataframe["chikou"] = pta.ichimoku( high=dataframe["high"], low=dataframe["low"], close=dataframe["close"], tenkan=TS, kijun=KS, senkou=SS, offset=OS, )[0][f"ICS_{KS}"] # For each row in the dataframe for i, row in dataframe.iterrows(): # Check if the close price is above the kumo cloud if (row['close'] > row['senkou_a']) & (row['close'] > row['senkou_b']): # And then check if the chikou is above the high of the candle 26 days ago if row['chikou'] > row['high']: # If so, then add True value to the respective buy_long cell dataframe.loc[i, 'buy_long'] = True # Else check if the close price is below the kumo cloud elif (row['close'] < row['senkou_a']) & (row['close'] < row['senkou_b']): # And then check if the chikou is below the low of the candle 26 days ago if row['chikou'] < row['low']: # If so, then add True value to the respective sell_short cell dataframe.loc[i, 'sell_short'] = True # first check if dataprovider is available if self.dp: if self.dp.runmode.value in ("live", "dry_run"): ob = self.dp.orderbook(metadata["pair"], 1) dataframe["best_bid"] = ob["bids"][0][0] dataframe["best_ask"] = ob["asks"][0][0] # print(self) print(metadata) # print(dataframe) return dataframe def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[ ( # If buy long signal is True, then enter a long trade (dataframe["buy_long"] == True) & (dataframe["volume"] > 0) # Guard ), ["enter_long", "enter_tag"], ] = (1, "Strong_long_signal") # # For short trades, use the section below # dataframe.loc[ # ( # # If sell short signal is True, then enter a short trade # (dataframe["sell_short"] == True) & (dataframe["volume"] > 0) # Guard # ), # ["enter_short", "enter_tag"], # ] = (1, "Strong_short_signal") return dataframe def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[ ( # The exit signal for long trades is pretty straightforward. # Sell when the close price is below the kijun sen (dataframe["close"] < dataframe["kijun"]) & (dataframe["volume"] > 0) # Guard ), ["exit_long", "exit_tag"], ] = (1, "Close_below_kijun") # # For short trades, use the section below # dataframe.loc[ # ( # # The exit signal for shorts trades is pretty straightforward. # # Sell when the close price is above the kijun sen # (dataframe["close"] > dataframe["kijun"]) & (dataframe["volume"] > 0) # Guard # ), # ["exit_short", "exit_tag"], # ] = (1, "Close_above_kijun") return dataframe |
Strategy League — fixed backtest that feeds the ranking
Export report Freqtrade logsRun finished · took 16.9s
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+685.28%
final wallet7853 USDT
win rate58.0%
max drawdown-1.15%
market change+403.38%
vs market+281.90%
timeframe1d
profit factor11.23
expectancy ratio4.296
sharpe1.089
sortino17.804
CAGR+51.0%
calmar703.991
avg MFE+58.35%
avg MAE-8.03%
avg profit/trade25.47%
avg duration627h 50m
best trade+524.78%
worst trade-17.83%
positive months34/48
consistent (3-mo)87.0%
worst 3-mo-4.49%
trades269
revision1
likely annual return+53%
range (5th–95th)+36% … +79%
chance of profit100.0%
worst-5% outcome+32%
significance (p)0.0
risk of ruin0.0%
- statistically significant edge (p=0.00)
- 100% of resampled runs stayed profitable
- profitable across 87% of rolling 3-month windows
- comfortably beat buy-and-hold
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 |
|---|---|---|---|---|---|---|---|---|---|
| Dec 2025 | bearish trending low vol | 1 | -0.07 | -0.71 | 0 | 1 | 0.0 | -0.01 | 552h 00m |
| Oct 2025 | bearish trending low vol | 2 | +6.83 | 34.29 | 2 | 0 | 100.0 | 0.0 | 1392h 00m |
| Sep 2025 | bullish choppy low vol | 11 | +12.92 | 11.74 | 6 | 5 | 54.5 | -0.38 | 584h 44m |
| Aug 2025 | bullish choppy low vol | 17 | +11.97 | 7.03 | 8 | 9 | 47.1 | -0.38 | 540h 42m |
| Jul 2025 | bullish choppy low vol | 3 | +2.21 | 7.35 | 1 | 2 | 33.3 | -0.24 | 464h 00m |
| Jun 2025 | bearish choppy low vol | 9 | +3.51 | 3.90 | 5 | 4 | 55.6 | -0.14 | 717h 20m |
| May 2025 | bullish trending low vol | 5 | +2.54 | 5.07 | 3 | 2 | 60.0 | -0.27 | 499h 12m |
| Apr 2025 | bullish choppy low vol | 1 | -0.40 | -3.95 | 0 | 1 | 0.0 | -0.05 | 72h 00m |
| Feb 2025 | bearish trending low vol | 1 | +1.50 | 15.00 | 1 | 0 | 100.0 | 0.0 | 1080h 00m |
| Jan 2025 | bearish choppy low vol | 5 | +1.54 | 3.08 | 2 | 3 | 40.0 | -0.08 | 312h 00m |
| Dec 2024 | bullish trending low vol | 12 | +113.22 | 94.34 | 10 | 2 | 83.3 | -0.16 | 1304h 00m |
| Nov 2024 | bullish trending low vol | 4 | -2.00 | -4.99 | 0 | 4 | 0.0 | -0.87 | 456h 00m |
| Oct 2024 | bullish choppy low vol | 10 | +1.81 | 1.81 | 3 | 7 | 30.0 | -0.56 | 350h 24m |
| Sep 2024 | bearish choppy low vol | 9 | -4.25 | -4.73 | 1 | 8 | 11.1 | -1.02 | 336h 00m |
| Aug 2024 | bearish choppy high vol | 2 | -0.66 | -3.32 | 1 | 1 | 50.0 | -0.18 | 768h 00m |
| Jun 2024 | bearish choppy low vol | 2 | +0.42 | 2.09 | 2 | 0 | 100.0 | -0.09 | 540h 00m |
| May 2024 | bullish choppy high vol | 5 | -0.87 | -1.74 | 2 | 3 | 40.0 | -0.23 | 331h 12m |
| Apr 2024 | bearish choppy high vol | 5 | +25.24 | 50.45 | 5 | 0 | 100.0 | 0.0 | 1267h 12m |
| Mar 2024 | bullish trending high vol | 8 | +16.89 | 21.11 | 7 | 1 | 87.5 | -0.11 | 858h 00m |
| Feb 2024 | bullish trending low vol | 5 | +7.96 | 15.92 | 2 | 3 | 40.0 | -0.99 | 422h 24m |
| Jan 2024 | bearish choppy high vol | 15 | +106.71 | 71.09 | 8 | 7 | 53.3 | -0.61 | 798h 24m |
| Dec 2023 | bullish trending low vol | 4 | +13.98 | 34.96 | 4 | 0 | 100.0 | 0.0 | 1368h 00m |
| Nov 2023 | bullish trending low vol | 3 | +10.44 | 34.75 | 2 | 1 | 66.7 | -0.31 | 1240h 00m |
| Oct 2023 | bullish trending low vol | 5 | -3.44 | -6.87 | 0 | 5 | 0.0 | -0.75 | 206h 24m |
| Aug 2023 | bearish choppy low vol | 6 | +4.52 | 7.53 | 6 | 0 | 100.0 | 0.0 | 532h 00m |
| Jul 2023 | bullish trending low vol | 6 | +18.84 | 31.38 | 6 | 0 | 100.0 | 0.0 | 532h 00m |
| Jun 2023 | bullish trending low vol | 4 | +0.29 | 0.74 | 1 | 3 | 25.0 | -0.31 | 516h 00m |
| Apr 2023 | bullish trending low vol | 8 | +11.11 | 13.88 | 6 | 2 | 75.0 | -1.12 | 720h 00m |
| Mar 2023 | bullish trending high vol | 6 | -3.89 | -6.48 | 0 | 6 | 0.0 | -0.91 | 220h 00m |
| Feb 2023 | bullish trending low vol | 16 | +30.62 | 19.12 | 12 | 4 | 75.0 | -0.7 | 495h 00m |
| Dec 2022 | bearish trending low vol | 3 | -1.88 | -6.27 | 1 | 2 | 33.3 | -0.83 | 288h 00m |
| Nov 2022 | bearish trending high vol | 2 | -1.08 | -5.42 | 0 | 2 | 0.0 | -0.36 | 108h 00m |
| Oct 2022 | bullish choppy low vol | 3 | +1.31 | 4.36 | 1 | 2 | 33.3 | -0.17 | 400h 00m |
| Sep 2022 | bearish choppy high vol | 1 | +2.96 | 29.58 | 1 | 0 | 100.0 | 0.0 | 1344h 00m |
| Aug 2022 | bullish choppy high vol | 5 | +6.11 | 12.24 | 4 | 1 | 80.0 | -0.31 | 571h 12m |
| May 2022 | bearish trending high vol | 1 | -0.00 | -0.05 | 0 | 1 | 0.0 | -0.08 | 144h 00m |
| Apr 2022 | bearish choppy high vol | 5 | +1.80 | 3.63 | 3 | 2 | 60.0 | -0.35 | 403h 12m |
| Mar 2022 | bullish choppy high vol | 3 | -1.49 | -4.98 | 0 | 3 | 0.0 | -0.54 | 56h 00m |
| Jan 2022 | bearish trending high vol | 1 | +1.77 | 17.86 | 1 | 0 | 100.0 | -0.16 | 648h 00m |
| Dec 2021 | bearish trending high vol | 3 | -2.37 | -7.95 | 0 | 3 | 0.0 | -0.61 | 104h 00m |
| Nov 2021 | bullish trending high vol | 8 | +26.82 | 33.54 | 8 | 0 | 100.0 | 0.0 | 888h 00m |
| Oct 2021 | bullish trending high vol | 7 | +29.44 | 42.02 | 3 | 4 | 42.9 | -1.03 | 610h 17m |
| Sep 2021 | bearish trending high vol | 12 | +36.18 | 30.14 | 9 | 3 | 75.0 | -0.5 | 642h 00m |
| Aug 2021 | bullish trending high vol | 2 | -0.61 | -3.03 | 1 | 1 | 50.0 | -0.21 | 504h 00m |
| May 2021 | bearish trending high vol | 6 | +116.27 | 193.75 | 6 | 0 | 100.0 | 0.0 | 1264h 00m |
| Apr 2021 | bearish choppy high vol | 9 | +72.80 | 80.88 | 7 | 2 | 77.8 | -0.7 | 656h 00m |
| Mar 2021 | bullish choppy high vol | 7 | +7.70 | 11.01 | 4 | 3 | 57.1 | -1.15 | 586h 17m |
| Feb 2021 | bullish trending high vol | 1 | +0.06 | 0.64 | 1 | 0 | 100.0 | 0.0 | 192h 00m |
Yearly breakdown
| Year | Trades | Profit % | Avg % | Win | Loss | Win % | DD % | Avg dur |
|---|---|---|---|---|---|---|---|---|
| 2025 | 55 | +42.55 | 7.74 | 28 | 27 | 50.9 | -0.38 | 582h 07m |
| 2024 | 77 | +264.47 | 34.33 | 41 | 36 | 53.2 | -1.02 | 721h 34m |
| 2023 | 58 | +82.47 | 14.21 | 37 | 21 | 63.8 | -1.12 | 580h 33m |
| 2022 | 24 | +9.50 | 3.97 | 11 | 13 | 45.8 | -0.83 | 394h 00m |
| 2021 | 55 | +286.29 | 52.04 | 39 | 16 | 70.9 | -1.15 | 694h 15m |
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 · 5 thing(s) worth reviewing before trusting the numbers
| Line | Pattern | Detail | |
|---|---|---|---|
| 169 | review | repaint_indicator | 'chikou' is Ichimoku's lagging span -- close shifted 26 bars into the past, so reading it at this bar reveals where price went 26 bars later |
| 180 | review | slow_loop | .iterrows() walks the dataframe one row at a time in Python. Over a full backtest that's millions of iterations -- the usual cause of a sandbox timeout. Express it with vectorised column operations |
| 184 | review | repaint_indicator | 'chikou' is Ichimoku's lagging span -- close shifted 26 bars into the past, so reading it at this bar reveals where price went 26 bars later |
| 190 | |||
| 207 | review | enter_tag_overwrite | enter_tag/exit_tag is written by 2 separate assignments -- they share one column and run in source order, so a row matching more than one condition keeps only the LAST tag. Per-tag statistics won't mean what they appear to |
ran by Ron · took s
Lookahead analysis
Freqtrade logsFailed — KeyError: 'buy_long'
^^^^^
File "/freqtrade/freqtrade/optimize/analysis/lookahead_helpers.py", line 257, in start
LookaheadAnalysisSubFunctions.initialize_single_lookahead_analysis(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
config, strategy_obj, progress
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/freqtrade/freqtrade/optimize/analysis/lookahead_helpers.py", line 216, in initialize_single_lookahead_analysis
current_instance.start(progress)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/freqtrade/freqtrade/optimize/analysis/lookahead.py", line 205, in start
self.fill_full_varholder()
~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/freqtrade/freqtrade/optimize/analysis/base_analysis.py", line 62, in fill_full_varholder
self.prepare_data(self.full_varHolder, self.local_config["pairs"])
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/freqtrade/freqtrade/optimize/analysis/lookahead.py", line 134, in prepare_data
filled_indicators[pair] = backtesting.strategy.ft_advise_signals(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
dataframe, {"pair": pair}
^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/freqtrade/freqtrade/strategy/interface.py", line 1781, in ft_advise_signals
dataframe = self.advise_entry(dataframe, metadata)
File "/freqtrade/freqtrade/strategy/interface.py", line 1850, in advise_entry
df = self.populate_entry_trend(dataframe, metadata)
File "/freqle/user_data/strategies/chikou_breakout_strong_s.py", line 210, in populate_entry_trend
(dataframe["buy_long"] == True) & (dataframe["volume"] > 0) # Guard
~~~~~~~~~^^^^^^^^^^^^
File "/home/ftuser/.local/lib/python3.14/site-packages/pandas/core/frame.py", line 4378, in __getitem__
indexer = self.columns.get_loc(key)
File "/home/ftuser/.local/lib/python3.14/site-packages/pandas/core/indexes/base.py", line 3648, in get_loc
raise KeyError(key) from err
KeyError: 'buy_long'