removing reserve keyword “filter”: replaced by “adjust”
This commit is contained in:
parent
7b80985533
commit
3330d327ed
@ -152,10 +152,12 @@ class Edge():
|
|||||||
def stoploss(self, pair: str) -> float:
|
def stoploss(self, pair: str) -> float:
|
||||||
return self._cached_pairs[pair].stoploss
|
return self._cached_pairs[pair].stoploss
|
||||||
|
|
||||||
def filter(self, pairs) -> list:
|
def adjust(self, pairs) -> list:
|
||||||
|
"""
|
||||||
|
Filters out and sorts "pairs" according to Edge calculated pairs
|
||||||
|
"""
|
||||||
|
|
||||||
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)) and \
|
info.winrate > float(self.edge_config.get('minimum_winrate', 0.60)) and \
|
||||||
@ -163,10 +165,7 @@ class Edge():
|
|||||||
final.append(pair)
|
final.append(pair)
|
||||||
|
|
||||||
if final:
|
if final:
|
||||||
logger.info(
|
logger.info('Edge validated only %s', final)
|
||||||
'Edge validated only %s',
|
|
||||||
final
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
logger.info('Edge removed all pairs as no pair with minimum expectancy was found !')
|
logger.info('Edge removed all pairs as no pair with minimum expectancy was found !')
|
||||||
|
|
||||||
|
@ -408,7 +408,7 @@ class FreqtradeBot(object):
|
|||||||
# running get_signal on historical data fetched
|
# running get_signal on historical data fetched
|
||||||
# to find buy signals
|
# to find buy signals
|
||||||
if self.edge:
|
if self.edge:
|
||||||
whitelist = self.edge.filter(whitelist)
|
whitelist = self.edge.adjust(whitelist)
|
||||||
|
|
||||||
for _pair in whitelist:
|
for _pair in whitelist:
|
||||||
(buy, sell) = self.strategy.get_signal(_pair, interval, self.exchange.klines.get(_pair))
|
(buy, sell) = self.strategy.get_signal(_pair, interval, self.exchange.klines.get(_pair))
|
||||||
|
Loading…
Reference in New Issue
Block a user