init _klines properly

This commit is contained in:
Matthias 2018-07-31 20:50:59 +02:00
parent 31870abd25
commit b45d465ed8

View File

@ -55,6 +55,7 @@ class FreqtradeBot(object):
self.persistence = None self.persistence = None
self.exchange = Exchange(self.config) self.exchange = Exchange(self.config)
self._init_modules() self._init_modules()
self._klines = {}
def _init_modules(self) -> None: def _init_modules(self) -> None:
""" """
@ -338,7 +339,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
for _pair in whitelist: for _pair in whitelist:
(buy, sell) = self.strategy.get_signal(_pair, interval, self._klines[_pair]) (buy, sell) = self.strategy.get_signal(_pair, interval, self._klines.get(_pair))
if buy and not sell: if buy and not sell:
buy_pairs.append(_pair) buy_pairs.append(_pair)