AlligatorStrategy
♡
Basics
mode: spot
timeframe: 1h
interface version: 3
Settings
stoploss: -0.99
has minimal roi
process only new candles: false
startup candle count: 200
hyperopt
hyperopt params: 2
Indicators
Stoch_RSI
ta
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 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 | # 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 # noqa import pandas as pd # noqa from pandas import DataFrame from freqtrade.strategy import BooleanParameter, CategoricalParameter, DecimalParameter, IStrategy, IntParameter # -------------------------------- # Add your lib to import here import ta # This class is a sample. Feel free to customize it. class AlligatorStrategy(IStrategy): """ Sources Crypto Robot : https://www.youtube.com/watch?v=tHYs5135jUA Github : https://github.com/CryptoRobotFr/TrueStrategy/blob/main/AligatorStrategy/Aligator_Strategy_backtest.ipynb freqtrade backtesting -s AlligatorStrategy --timerange=20200903-20210826 --stake-amount unlimited -p EGLD/USDT --config user_data/config_binance.json --enable-position-stacking =============== SUMMARY METRICS ================ | Metric | Value | |------------------------+---------------------| | Backtesting from | 2020-09-11 11:00:00 | | Backtesting to | 2021-08-26 00:00:00 | | Max open trades | 1 | | | | | Total/Daily Avg Trades | 258 / 0.74 | | Starting balance | 1000.000 USDT | | Final balance | 14245.054 USDT | | Absolute profit | 13245.054 USDT | | Total profit % | 1324.51% | | Trades per day | 0.74 | | Avg. daily profit % | 3.81% | | Avg. stake amount | 829.268 USDT | | Total trade volume | 213951.164 USDT | | | | | Best Pair | EGLD/USDT 4287.66% | | Worst Pair | EGLD/USDT 4287.66% | | Best trade | EGLD/USDT 305.28% | | Worst trade | EGLD/USDT -10.69% | | Best day | 7078.313 USDT | | Worst day | -1052.860 USDT | | Days win/draw/lose | 8 / 275 / 19 | | Avg. Duration Winners | 9 days, 18:58:00 | | Avg. Duration Loser | 2 days, 9:00:00 | | Rejected Buy signals | 3045 | | | | | Min balance | 905.332 USDT | | Max balance | 16789.797 USDT | | Drawdown | 169.59% | | Drawdown | 2544.743 USDT | | Drawdown high | 15789.797 USDT | | Drawdown low | 13245.054 USDT | | Drawdown Start | 2021-08-12 18:00:00 | | Drawdown End | 2021-08-24 18:00:00 | | Market change | 497.97% | ================================================ You must keep: - the lib in the section "Do not remove these libs" - the methods: populate_indicators, populate_entry_trend, populate_exit_trend You should keep: - timeframe, minimal_roi, stoploss, trailing_* """ # 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 # Minimal ROI designed for the strategy. # This attribute will be overridden if the config file contains "minimal_roi". # inactive minimal_roi = {'0': 100} # Optimal stoploss designed for the strategy. # This attribute will be overridden if the config file contains "stoploss". stoploss = -0.99 # inactive # Trailing stoploss trailing_stop = False # trailing_only_offset_is_reached = False # trailing_stop_positive = 0.01 # trailing_stop_positive_offset = 0.0 # Disabled / not configured # Hyperoptable parameters entry_stoch_rsi = DecimalParameter(0.5, 1, decimals=3, default=0.82, space='entry') exit_stoch_rsi = DecimalParameter(0, 0.5, decimals=3, default=0.2, space='exit') # Optimal timeframe for the strategy. timeframe = '1h' # Run "populate_indicators()" only for new candle. process_only_new_candles = False # These values can be overridden in the "ask_strategy" section 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 startup_candle_count = 200 # EMA200 # 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'} plot_config = {'main_plot': {'ema7': {}, 'ema30': {}, 'ema50': {}, 'ema100': {}, 'ema121': {}, 'ema200': {}}, 'subplots': {'STOCH RSI': {'stoch_rsi': {}}}} def informative_pairs(self): """ Define additional, informative pair/interval combinations to be cached from the exchange. These pair/interval combinations are non-tradeable, unless they are part of the whitelist as well. For more information, please consult the documentation :return: List of tuples in the format (pair, interval) Sample: return [("ETH/USDT", "5m"), ("BTC/USDT", "15m"), ] """ return [] def populate_indicators(self, dataframe: DataFrame, metadata: dict) -> DataFrame: """ Adds several different TA indicators to the given DataFrame Performance Note: For the best performance be frugal on the number of indicators you are using. Let uncomment only the indicator you are using in your strategies or your hyperopt configuration, otherwise you will waste your memory and CPU usage. :param dataframe: Dataframe with data from the exchange :param metadata: Additional information, like the currently traded pair :return: a Dataframe with all mandatory indicators for the strategies """ # Momentum Indicators # ------------------------------------ # # Stochastic RSI dataframe['stoch_rsi'] = ta.momentum.stochrsi(close=dataframe['close'], window=14, smooth1=3, smooth2=3) #Non moyenné # Overlap Studies # ------------------------------------ # # EMA - Exponential Moving Average dataframe['ema7'] = ta.trend.ema_indicator(close=dataframe['close'], window=7) dataframe['ema30'] = ta.trend.ema_indicator(close=dataframe['close'], window=30) dataframe['ema50'] = ta.trend.ema_indicator(close=dataframe['close'], window=50) dataframe['ema100'] = ta.trend.ema_indicator(close=dataframe['close'], window=100) dataframe['ema121'] = ta.trend.ema_indicator(close=dataframe['close'], window=121) dataframe['ema200'] = ta.trend.ema_indicator(close=dataframe['close'], window=200) return dataframe def populate_entry_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: """ Based on TA indicators, populates the entry signal for the given dataframe :param dataframe: DataFrame populated with indicators :param metadata: Additional information, like the currently traded pair :return: DataFrame with entry column """ dataframe.loc[(dataframe['ema7'] > dataframe['ema30']) & (dataframe['ema30'] > dataframe['ema50']) & (dataframe['ema50'] > dataframe['ema100']) & (dataframe['ema100'] > dataframe['ema121']) & (dataframe['ema121'] > dataframe['ema200']) & (dataframe['stoch_rsi'] < self.entry_stoch_rsi.value) & (dataframe['volume'] > 0), 'enter_long'] = 1 return dataframe def populate_exit_trend(self, dataframe: DataFrame, metadata: dict) -> DataFrame: """ Based on TA indicators, populates the exit signal for the given dataframe :param dataframe: DataFrame populated with indicators :param metadata: Additional information, like the currently traded pair :return: DataFrame with exit column """ dataframe.loc[(dataframe['ema121'] > dataframe['ema7']) & (dataframe['stoch_rsi'] > self.exit_stoch_rsi.value) & (dataframe['volume'] > 0), 'exit_long'] = 1 return dataframe |
Strategy League — fixed backtest that feeds the ranking
Failed — strategy imports unavailable module: ta
guration - INFO - Using user-data directory: /freqle/user_data ... 2026-07-29 03:32:08,797 - freqtrade.configuration.configuration - INFO - Using data directory: /freqle/user_data/data/binance ... 2026-07-29 03:32:08,798 - freqtrade.configuration.configuration - INFO - Parameter --export detected: none ... 2026-07-29 03:32:08,798 - freqtrade.configuration.configuration - INFO - Parameter --cache=none detected ... 2026-07-29 03:32:08,798 - freqtrade.configuration.configuration - INFO - Filter trades by timerange: 20210101-20260101 2026-07-29 03:32:08,799 - freqtrade.exchange.check_exchange - INFO - Checking exchange... 2026-07-29 03:32:08,806 - freqtrade.exchange.check_exchange - INFO - Exchange "binance" is officially supported by the Freqtrade development team. 2026-07-29 03:32:08,806 - freqtrade.configuration.configuration - INFO - Using pairlist from configuration. 2026-07-29 03:32:08,806 - freqtrade.configuration.config_validation - INFO - Validating configuration ... 2026-07-29 03:32:08,808 - freqtrade.exchange.exchange - INFO - Instance is running with dry_run enabled 2026-07-29 03:32:08,808 - freqtrade.exchange.exchange - INFO - Using CCXT 4.5.61 2026-07-29 03:32:08,821 - freqtrade.exchange.exchange - INFO - Using Exchange "Binance" 2026-07-29 03:32:09,058 - freqtrade.resolvers.exchange_resolver - INFO - Using resolved exchange 'Binance'... 2026-07-29 03:32:09,060 - freqtrade.resolvers.iresolver - WARNING - Could not import /freqle/user_data/strategies/AlligatorStrategy.py due to 'No module named 'ta'' 2026-07-29 03:32:09,062 - freqtrade.resolvers.iresolver - WARNING - Could not import /freqle/user_data/strategies/AlligatorStrategy.py due to 'No module named 'ta'' 2026-07-29 03:32:09,064 - freqtrade.resolvers.iresolver - WARNING - Could not import /freqle/user_data/strategies/AlligatorStrategy.py due to 'No module named 'ta'' ft_backtest wrapper failed: Impossible to load Strategy 'AlligatorStrategy'. This class does not exist or contains Python code errors.
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 | |
|---|---|---|---|
| 87 | 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.