From b45d465ed833264aaf1832b8f048fbbd4c6fc306 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 31 Jul 2018 20:50:59 +0200 Subject: [PATCH] init _klines properly --- freqtrade/freqtradebot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index eaa2184ac..4313b310d 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -55,6 +55,7 @@ class FreqtradeBot(object): self.persistence = None self.exchange = Exchange(self.config) self._init_modules() + self._klines = {} def _init_modules(self) -> None: """ @@ -338,7 +339,7 @@ class FreqtradeBot(object): # running get_signal on historical data fetched # to find buy signals 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: buy_pairs.append(_pair)