Basics
mode: spot
timeframe: 5m
interface version: 3
Settings
stoploss: -0.1
has minimal roi
process only new candles: false
startup candle count: 200
Indicators
Bollinger_Bands
RSI
SMA
talib
Concepts
breakout
mean_reversion
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 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 | """ Bollinger Breakout Strategy A strategy based on Bollinger Bands for breakout trading. Entry: When price breaks above upper Bollinger Band Exit: When price returns to middle band or profit target reached """ # pragma pylint: disable=missing-docstring, invalid-name, pointless-string-statement # flake8: noqa: F401 # isort: skip_file import numpy as np import pandas as pd from pandas import DataFrame from typing import Optional import talib.abstract as ta from freqtrade.strategy import IStrategy class BollingerBreakoutStrategy(IStrategy): """ Bollinger Breakout Strategy Uses Bollinger Bands to identify breakouts. """ INTERFACE_VERSION = 3 timeframe = '5m' can_short: bool = False # ROI table minimal_roi = { "0": 0.10, # 10% profit target "60": 0.05, # 5% after 60 minutes "120": 0.02 # 2% after 120 minutes } stoploss = -0.10 # 10% stop loss trailing_stop = False process_only_new_candles = False use_exit_signal = True exit_profit_only = False ignore_roi_if_entry_signal = False startup_candle_count: int = 200 def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: """ Add indicators to the dataframe. Args: dataframe: DataFrame with OHLCV data metadata: Pair metadata Returns: DataFrame with indicators added """ # Bollinger Bands bollinger = ta.BBANDS(dataframe, timeperiod=20, nbdevup=2.0, nbdevdn=2.0) dataframe['bb_upper'] = bollinger['upperband'] dataframe['bb_middle'] = bollinger['middleband'] dataframe['bb_lower'] = bollinger['lowerband'] # RSI for confirmation dataframe['rsi'] = ta.RSI(dataframe, timeperiod=14) # Volume SMA dataframe['volume_sma'] = ta.SMA(dataframe['volume'], timeperiod=20) # Price position within bands dataframe['bb_percent'] = ( (dataframe['close'] - dataframe['bb_lower']) / (dataframe['bb_upper'] - dataframe['bb_lower']) ) return dataframe def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: """ Populate entry signals. Entry when: - Price breaks above upper Bollinger Band - RSI is strong but not overbought (50-75) - Volume is above average """ dataframe.loc[ ( (dataframe['close'] > dataframe['bb_upper']) & (dataframe['close'].shift(1) <= dataframe['bb_upper'].shift(1)) & (dataframe['rsi'] > 50) & (dataframe['rsi'] < 75) & (dataframe['volume'] > dataframe['volume_sma'] * 0.9) & (dataframe['bb_percent'] > 1.0) # Above upper band ), 'enter_long' ] = 1 return dataframe def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: """ Populate exit signals. Exit when: - Price returns to middle band - RSI becomes overbought (> 80) """ dataframe.loc[ ( (dataframe['close'] < dataframe['bb_middle']) & (dataframe['close'].shift(1) >= dataframe['bb_middle'].shift(1)) ) | (dataframe['rsi'] > 80), 'exit_long' ] = 1 return dataframe |
Strategy League — fixed backtest that feeds the ranking
Export report Freqtrade logsRun finished · took 325.0s
pairs 33 pairs
timerange 20210101-20260101
mode spot
timeframe 5m
stake 100 USDT
wallet 1000 USDT
max open trades 10
fee exchange lowest tier
total profit-89.91%
final wallet101 USDT
win rate31.6%
max drawdown-91.14%
market change+451.55%
vs market-541.46%
timeframe5m
profit factor0.89
expectancy ratio-0.075
sharpe-4.323
sortino-10.309
CAGR-36.8%
calmar-1.032
avg MFE+1.82%
avg MAE-1.23%
avg profit/trade-0.09%
avg duration0h 59m
best trade+10.02%
worst trade-10.18%
positive months1/6
consistent (3-mo)0.0%
worst 3-mo-68.27%
trades9954
revision1
likely annual return-99%
range (5th–95th)-100% … -97%
chance of profit0.0%
worst-5% outcome-100%
significance (p)1.0
risk of ruin0.0%
- profit isn't statistically significant (p=1.00) — hard to tell apart from luck
- only 0% of resampled runs were profitable
- profitable in only 0% of rolling 3-month windows
- did not beat simply holding the market
- very deep drawdown (-91%)
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 |
|---|---|---|---|---|---|---|---|---|---|
| Jun 2021 | bearish trending high vol | 138 | -3.21 | -0.23 | 42 | 96 | 30.4 | -91.14 | 0h 57m |
| May 2021 | bearish trending high vol | 793 | -12.19 | -0.15 | 246 | 547 | 31.0 | -89.82 | 0h 57m |
| Apr 2021 | bearish choppy high vol | 1319 | -20.41 | -0.15 | 416 | 903 | 31.5 | -78.64 | 0h 58m |
| Mar 2021 | bullish choppy high vol | 2128 | -35.67 | -0.17 | 617 | 1511 | 29.0 | -61.22 | 0h 59m |
| Feb 2021 | bullish trending high vol | 2550 | +2.50 | 0.01 | 844 | 1706 | 33.1 | -32.74 | 1h 00m |
| Jan 2021 | bullish trending high vol | 3026 | -20.93 | -0.07 | 978 | 2048 | 32.3 | -34.06 | 0h 58m |
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 | |
|---|---|---|---|
| 42 | review | unthrottled_candle_processing | process_only_new_candles is False, so populate_indicators/populate_entry_trend/populate_exit_trend re-run every throttle_secs (default 5s) even though their inputs -- closed candles -- haven't changed since the last run. This wastes CPU without changing any value; if the goal is order-book-level checks, put that logic in confirm_trade_entry/custom_exit instead, which already run every loop |
ran by Ron · took s
Lookahead analysis
freqtrade lookahead-analysis: detects strategies peeking at future candles.