mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
flake8
This commit is contained in:
parent
53eaf85969
commit
a3835b1279
|
@ -206,19 +206,17 @@ class Edge():
|
|||
def accepted_pairs(self) -> list:
|
||||
"""
|
||||
return a list of accepted pairs along with their winrate, expectancy and stoploss
|
||||
ex:
|
||||
#[{'Pair': 'ADX/ETH', 'Winrate': 0.08333333333333333, 'Expectancy': -0.8105153934775888, 'Stoploss': -0.02}]
|
||||
"""
|
||||
final = []
|
||||
for pair, info in self._cached_pairs.items():
|
||||
if info.expectancy > float(self.edge_config.get('minimum_expectancy', 0.2)) and \
|
||||
info.winrate > float(self.edge_config.get('minimum_winrate', 0.60)):
|
||||
final.append({
|
||||
'Pair': pair,
|
||||
'Winrate': info.winrate,
|
||||
'Expectancy': info.expectancy,
|
||||
'Stoploss': info.stoploss,
|
||||
})
|
||||
info.winrate > float(self.edge_config.get('minimum_winrate', 0.60)):
|
||||
final.append({
|
||||
'Pair': pair,
|
||||
'Winrate': info.winrate,
|
||||
'Expectancy': info.expectancy,
|
||||
'Stoploss': info.stoploss,
|
||||
})
|
||||
return final
|
||||
|
||||
def _fill_calculable_fields(self, result: DataFrame) -> DataFrame:
|
||||
|
|
|
@ -484,4 +484,4 @@ class RPC(object):
|
|||
""" Returns information related to Edge """
|
||||
if not self._freqtrade.edge:
|
||||
raise RPCException(f'Edge is not enabled.')
|
||||
return self._freqtrade.edge.accepted_pairs()
|
||||
return self._freqtrade.edge.accepted_pairs()
|
||||
|
|
Loading…
Reference in New Issue
Block a user