diff --git a/freqtrade/exchange/__init__.py b/freqtrade/exchange/__init__.py index 59a5da23e..53ae6c2d7 100644 --- a/freqtrade/exchange/__init__.py +++ b/freqtrade/exchange/__init__.py @@ -349,7 +349,8 @@ class Exchange(object): raise OperationalException( 'In stoploss limit order, stop price should be more than limit price') - return self._api.create_order(pair, 'stop_loss', 'sell', amount, rate, {'stopPrice': stop_price}) + return self._api.create_order(pair, 'stop_loss', 'sell', + amount, rate, {'stopPrice': stop_price}) @retrier def get_balance(self, currency: str) -> float: diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 744f92156..40734f385 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -492,8 +492,8 @@ class FreqtradeBot(object): # 0.98 is arbitrary here. limit_price = stop_price * 0.98 - stoploss_order_id = self.exchange.stoploss_limit(pair=pair, amount=amount, - stop_price=stop_price, rate=limit_price)['id'] + stoploss_order_id = self.exchange.stoploss_limit( + pair=pair, amount=amount, stop_price=stop_price, rate=limit_price)['id'] self.rpc.send_msg({ 'type': RPCMessageType.BUY_NOTIFICATION, diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index df0e3cf72..9047d8807 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -231,8 +231,8 @@ class IStrategy(ABC): stoplossflag = False else: stoplossflag = self.stop_loss_reached(current_rate=current_rate, trade=trade, - current_time=date, current_profit=current_profit, - force_stoploss=force_stoploss) + current_time=date, current_profit=current_profit, + force_stoploss=force_stoploss) if stoplossflag.sell_flag: return stoplossflag