Satisfy linter.
This commit is contained in:
@@ -12,6 +12,7 @@ from freqtrade.persistence import Trade
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class PerformanceFilter(IPairList):
|
||||
|
||||
def __init__(self, exchange, pairlistmanager,
|
||||
@@ -19,7 +20,6 @@ class PerformanceFilter(IPairList):
|
||||
pairlist_pos: int) -> None:
|
||||
super().__init__(exchange, pairlistmanager, config, pairlistconfig, pairlist_pos)
|
||||
|
||||
|
||||
@property
|
||||
def needstickers(self) -> bool:
|
||||
"""
|
||||
@@ -46,11 +46,11 @@ class PerformanceFilter(IPairList):
|
||||
# Get the trading performance for pairs from database
|
||||
perf = pd.DataFrame(Trade.get_overall_performance())
|
||||
# get pairlist from performance dataframe values
|
||||
list_df = pd.DataFrame({'pair':pairlist})
|
||||
list_df = pd.DataFrame({'pair': pairlist})
|
||||
# set initial value for pairs with no trades to 0
|
||||
# and sort the list using performance and count
|
||||
sorted_df = list_df.join(perf.set_index('pair'), on='pair')\
|
||||
.fillna(0).sort_values(by=['profit', 'count'], ascending=False)
|
||||
pairlist = sorted_df['pair'].tolist()
|
||||
|
||||
return pairlist
|
||||
return pairlist
|
||||
|
Reference in New Issue
Block a user