From 24364a56ea7dfcbef99eb50be69a334fff7fa43a Mon Sep 17 00:00:00 2001 From: misagh Date: Wed, 26 Sep 2018 17:03:10 +0200 Subject: [PATCH] keeping mypy happy --- freqtrade/edge/__init__.py | 10 +++++----- freqtrade/freqtradebot.py | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/freqtrade/edge/__init__.py b/freqtrade/edge/__init__.py index 8990c6b35..1f2633dde 100644 --- a/freqtrade/edge/__init__.py +++ b/freqtrade/edge/__init__.py @@ -33,8 +33,8 @@ class Edge(): self.ticker_interval = self.strategy.ticker_interval self.tickerdata_to_dataframe = self.strategy.tickerdata_to_dataframe self.get_timeframe = Backtesting.get_timeframe - self.populate_buy_trend = self.strategy.populate_buy_trend - self.populate_sell_trend = self.strategy.populate_sell_trend + self.advise_sell = self.strategy.advise_sell + self.advise_buy = self.strategy.advise_buy self.edge_config = self.config.get('edge', {}) @@ -108,9 +108,9 @@ class Edge(): # Sorting dataframe by date and reset index pair_data = pair_data.sort_values(by=['date']) pair_data = pair_data.reset_index(drop=True) - - ticker_data = self.populate_sell_trend( - self.populate_buy_trend(pair_data))[headers].copy() + + ticker_data = self.advise_sell( + self.advise_buy(pair_data, {'pair': pair}), {'pair': pair})[headers].copy() trades += self._find_trades_for_stoploss_range(ticker_data, pair, stoploss_range) diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index be02db9a8..77e2b4915 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -338,11 +338,11 @@ class FreqtradeBot(object): if avaliable_amount < stake_amount: raise DependencyException( 'Available balance(%f %s) is lower than stake amount(%f %s)' % ( - avaliable_amount, self.config['stake_currency'], - stake_amount, self.config['stake_currency']) + float(avaliable_amount), self.config['stake_currency'], + float(stake_amount), self.config['stake_currency']) ) - return stake_amount + return float(stake_amount) def _get_min_pair_stake_amount(self, pair: str, price: float) -> Optional[float]: markets = self.exchange.get_markets()