From 5b073854144a3376cdf25eeeb8ce5c50025fd2d8 Mon Sep 17 00:00:00 2001 From: Stefano Ariestasia Date: Thu, 14 Sep 2023 08:13:47 +0900 Subject: [PATCH] simplify the filter --- freqtrade/plugins/pairlist/FullTradesFilter.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/freqtrade/plugins/pairlist/FullTradesFilter.py b/freqtrade/plugins/pairlist/FullTradesFilter.py index 77b755009..f1578733a 100644 --- a/freqtrade/plugins/pairlist/FullTradesFilter.py +++ b/freqtrade/plugins/pairlist/FullTradesFilter.py @@ -59,14 +59,7 @@ class FullTradesFilter(IPairList): :return: new allowlist """ # Get the trading performance for pairs from database - try: - trades = Trade.get_trades(Trade.is_open.is_(True)).all() - except AttributeError: - # Performancefilter does not work in backtesting. - self.log_once("FullTradesFilter is not available in this mode.", logger.warning) - return pairlist - - num_open = len(trades) + num_open = Trade.get_open_trade_count() max_trades = self._config['max_open_trades'] # self.log_once(f"Max open trades: {max_trades}, current open trades: {num_open}", logger.info)