This commit is contained in:
Misagh 2019-04-03 14:14:47 +02:00
parent 53eaf85969
commit a3835b1279
2 changed files with 8 additions and 10 deletions

View File

@ -206,19 +206,17 @@ class Edge():
def accepted_pairs(self) -> list: def accepted_pairs(self) -> list:
""" """
return a list of accepted pairs along with their winrate, expectancy and stoploss 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 = [] final = []
for pair, info in self._cached_pairs.items(): for pair, info in self._cached_pairs.items():
if info.expectancy > float(self.edge_config.get('minimum_expectancy', 0.2)) and \ if info.expectancy > float(self.edge_config.get('minimum_expectancy', 0.2)) and \
info.winrate > float(self.edge_config.get('minimum_winrate', 0.60)): info.winrate > float(self.edge_config.get('minimum_winrate', 0.60)):
final.append({ final.append({
'Pair': pair, 'Pair': pair,
'Winrate': info.winrate, 'Winrate': info.winrate,
'Expectancy': info.expectancy, 'Expectancy': info.expectancy,
'Stoploss': info.stoploss, 'Stoploss': info.stoploss,
}) })
return final return final
def _fill_calculable_fields(self, result: DataFrame) -> DataFrame: def _fill_calculable_fields(self, result: DataFrame) -> DataFrame: