Pair name-based sorting.
Attempt at more rational string sorting. Change test to show not working as expected.
This commit is contained in:
parent
03c5714399
commit
6a74c57c3d
@ -55,7 +55,7 @@ class PerformanceFilter(IPairList):
|
||||
# set initial value for pairs with no trades to 0
|
||||
# and sort the list using performance and count
|
||||
sorted_df = list_df.merge(performance, on='pair', how='left')\
|
||||
.fillna(0).sort_values(by=['profit', 'count'], ascending=False)
|
||||
.fillna(0).sort_values(by=['profit', 'count', 'pair'], ascending=False)
|
||||
pairlist = sorted_df['pair'].tolist()
|
||||
|
||||
return pairlist
|
||||
|
@ -305,7 +305,7 @@ def test_VolumePairList_refresh_empty(mocker, markets_empty, whitelist_conf):
|
||||
# PerformanceFilter
|
||||
([{"method": "VolumePairList", "number_assets": 5, "sort_key": "quoteVolume"},
|
||||
{"method": "PerformanceFilter"}],
|
||||
"USDT", ['ETH/USDT', 'NANO/USDT', 'ADAHALF/USDT', 'ADADOUBLE/USDT']),
|
||||
"USDT", ['ETH/USDT', 'NANO/USDT', 'ADADOUBLE/USDT', 'ADAHALF/USDT']),
|
||||
# AgeFilter only
|
||||
([{"method": "AgeFilter", "min_days_listed": 2}],
|
||||
"BTC", 'filter_at_the_beginning'), # OperationalException expected
|
||||
|
Loading…
Reference in New Issue
Block a user