BigTrader
♡
Basics
mode: spot
timeframe: 5m
interface version: 3
Settings
stoploss: -0.5
has minimal roi
trailing
process only new candles
startup candle count: 60
Indicators
SMA
talib
technical
Concepts
trailing
13 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 | # --- Do not remove these libs --- from freqtrade.strategy.interface import IStrategy from freqtrade.strategy import merge_informative_pair from typing import Dict, List from functools import reduce from pandas import DataFrame # -------------------------------- import talib.abstract as ta import freqtrade.vendor.qtpylib.indicators as qtpylib import datetime from technical.util import resample_to_interval, resampled_merge from datetime import datetime, timedelta from freqtrade.persistence import Trade from freqtrade.strategy import stoploss_from_open # BASED ON SMAOffset by Tirail. # MOD BY Czaruś # Backtested with 1 max open trade on Binance with USDT pairs, 5m timeframe. # This strat trades once a day or once every other day. # # # ======================================================= SELL REASON STATS ======================================================== # | Sell Reason | Sells | Win Draws Loss Win% | Avg Profit % | Cum Profit % | Tot Profit USDT | Tot Profit % | # |--------------------+---------+--------------------------+----------------+----------------+-------------------+----------------| # | trailing_stop_loss | 39 | 39 0 0 100 | 3.49 | 136.09 | 28862.4 | 136.09 | # | roi | 1 | 1 0 0 100 | 8.99 | 8.99 | 1977.06 | 8.99 | # ====================================================== LEFT OPEN TRADES REPORT ====================================================== # | Pair | Buys | Avg Profit % | Cum Profit % | Tot Profit USDT | Tot Profit % | Avg Duration | Win Draw Loss Win% | # |--------+--------+----------------+----------------+-------------------+----------------+----------------+-------------------------| # | TOTAL | 0 | 0.00 | 0.00 | 0.000 | 0.00 | 0:00 | 0 0 0 0 | # ================== SUMMARY METRICS =================== # | Metric | Value | # |------------------------+---------------------------| # | Backtesting from | 2021-04-30 00:00:00 | # | Backtesting to | 2021-07-27 08:35:00 | # | Max open trades | 1 | # | | | # | Total/Daily Avg Trades | 40 / 0.45 | # | Starting balance | 10000.000 USDT | # | Final balance | 40839.439 USDT | # | Absolute profit | 30839.439 USDT | # | Total profit % | 308.39% | # | Avg. stake amount | 19858.310 USDT | # | Total trade volume | 794332.392 USDT | # | | | # | Best Pair | DATA/USDT 20.44% | # | Worst Pair | ADA/USDT 0.0% | # | Best trade | ONG/USDT 8.99% | # | Worst trade | ETC/USDT 2.2% | # | Best day | 5198.630 USDT | # | Worst day | 0.000 USDT | # | Days win/draw/lose | 18 / 42 / 0 | # | Avg. Duration Winners | 11:22:00 | # | Avg. Duration Loser | 0:00:00 | # | Rejected Buy signals | 536137 | # | | | # | Min balance | 0.000 USDT | # | Max balance | 0.000 USDT | # | Drawdown | 0.0% | # | Drawdown | 0.000 USDT | # | Drawdown high | 0.000 USDT | # | Drawdown low | 0.000 USDT | # | Drawdown Start | 1970-01-01 00:00:00+00:00 | # | Drawdown End | 1970-01-01 00:00:00+00:00 | # | Market change | -53.09% | # ====================================================== low_offset = 0.958 # something lower than 1 high_offset = 1.012 # something higher than 1 class BigTrader(IStrategy): INTERFACE_VERSION = 3 # ROI table: minimal_roi = {'0': 0.09} # Stoploss: stoploss = -0.5 # Trailing stop: trailing_stop = True trailing_stop_positive = 0.005 trailing_stop_positive_offset = 0.029 trailing_only_offset_is_reached = True # Sell signal use_exit_signal = True exit_profit_only = True exit_profit_offset = 0.01 ignore_roi_if_entry_signal = True # Optimal timeframe for the strategy timeframe = '5m' # Run "populate_indicators()" only for new candle. process_only_new_candles = True # Number of candles the strategy requires before producing valid signals startup_candle_count: int = 60 # Optional order type mapping. order_types = {'entry': 'market', 'exit': 'market', 'stoploss': 'market', 'stoploss_on_exchange': True} # Optional order time in force. order_time_in_force = {'entry': 'gtc', 'exit': 'gtc'} plot_config = {'main_plot': {'tema': {}, 'sar': {'color': 'white'}}, 'subplots': {'MACD': {'macd': {'color': 'blue'}, 'macdsignal': {'color': 'orange'}}, 'RSI': {'rsi': {'color': 'red'}}}} # def informative_pairs(self): # get access to all pairs available in whitelist. # pairs = self.dp.current_whitelist() # Assign tf to each pair so they can be downloaded and cached for strategy. # informative_pairs = [("BTC/USDT", "5m") # ] # return informative_pairs def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: # assert self.dp, "DataProvider is required for multiple timeframes." # Get the informative pair # informative = self.dp.get_pair_dataframe(pair=metadata['pair'], timeframe=self.timeframe) # SMA # informative['sma_10'] = ta.SMA(informative, timeperiod=10) # informative['sma_4'] = ta.SMA(informative, timeperiod=4) # dataframe = merge_informative_pair(dataframe, informative, self.timeframe, '5m', ffill=True) # dataframe['sma_30'] = ta.SMA(dataframe, timeperiod=30) # dataframe['sma_20'] = ta.SMA(dataframe, timeperiod=20) dataframe['sma_15'] = ta.SMA(dataframe, timeperiod=15) # dataframe['sma_5'] = ta.SMA(dataframe, timeperiod=5) # dataframe['sma_3'] = ta.SMA(dataframe, timeperiod=3) # dataframe['sma_2'] = ta.SMA(dataframe, timeperiod=2) # dataframe['sma_10'] = ta.SMA(dataframe, timeperiod=10) # dataframe['volume_shifted'] = dataframe['volume'].shift(3) # dataframe['volume_shifted_sold'] = dataframe['volume'].shift(4) # dataframe['volume_shifted_entry'] = dataframe['volume'].shift(1) # dataframe['sma_5'] = ta.SMA(dataframe, timeperiod=5) return dataframe def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[(dataframe['close'] < dataframe['sma_15'] * low_offset) & (dataframe['close'] > dataframe['close'].shift(4)) & (dataframe['close'].shift(8) > dataframe['close'].shift(4)) & (dataframe['close'].shift(12) > dataframe['close'].shift(8)) & (dataframe['volume'] > 0), 'enter_long'] = 1 return dataframe def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: dataframe.loc[(dataframe['open'] > dataframe['sma_15'] * high_offset) & (dataframe['open'] < dataframe['close'].shift(4)) & (dataframe['close'].shift(8) < dataframe['close'].shift(4)) & (dataframe['close'].shift(12) < dataframe['close'].shift(8)) & (dataframe['volume'] > 0), 'exit_long'] = 1 return dataframe |
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.