extract get_history_data from get_signal

This commit is contained in:
Matthias
2018-07-26 18:22:23 +01:00
parent 6e437a7290
commit 484103b957
2 changed files with 9 additions and 5 deletions

View File

@@ -107,14 +107,13 @@ class IStrategy(ABC):
dataframe = self.populate_sell_trend(dataframe)
return dataframe
def get_signal(self, exchange: Exchange, pair: str, interval: str) -> Tuple[bool, bool]:
def get_signal(self, pair: str, interval: str, ticker_hist: List[Dict]) -> Tuple[bool, bool]:
"""
Calculates current signal based several technical analysis indicators
:param pair: pair in format ANT/BTC
:param interval: Interval to use (in min)
:return: (Buy, Sell) A bool-tuple indicating buy/sell signal
"""
ticker_hist = exchange.get_ticker_history(pair, interval)
if not ticker_hist:
logger.warning('Empty ticker history for pair %s', pair)
return False, False