mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 18:23:55 +00:00
simplify the filter
This commit is contained in:
parent
44ca6f1c46
commit
5b07385414
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user