Updates after review to PerformanceFilter days param

This commit is contained in:
Sergey Khliustin
2021-09-17 13:45:44 +03:00
committed by Sergey Khliustin
parent 457e738b4a
commit 54ef36a497
2 changed files with 7 additions and 32 deletions

View File

@@ -48,10 +48,7 @@ class PerformanceFilter(IPairList):
"""
# Get the trading performance for pairs from database
try:
if self._days > 0:
performance = pd.DataFrame(Trade.get_performance(self._days))
else:
performance = pd.DataFrame(Trade.get_overall_performance())
performance = pd.DataFrame(Trade.get_overall_performance(self._days))
except AttributeError:
# Performancefilter does not work in backtesting.
self.log_once("PerformanceFilter is not available in this mode.", logger.warning)