diff --git a/freqtrade/freqtradebot.py b/freqtrade/freqtradebot.py index 40734f385..ac9fd758c 100644 --- a/freqtrade/freqtradebot.py +++ b/freqtrade/freqtradebot.py @@ -479,13 +479,13 @@ class FreqtradeBot(object): order_id = self.exchange.buy(pair=pair, ordertype=self.strategy.order_types['buy'], amount=amount, rate=buy_limit)['id'] - stoploss_order_id: int = None + stoploss_order_id = None # Check if stoploss should be added on exchange # If True then here immediately after buy we should # Add the stoploss order if self.strategy.stoploss_on_exchange: - stoploss = self.edge.stoploss if self.edge else self.strategy.stoploss + stoploss = self.edge.stoploss(pair=pair) if self.edge else self.strategy.stoploss stop_price = buy_limit * (1 + stoploss) # limit price should be less than stop price. diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index 9047d8807..30fc62f42 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -228,7 +228,7 @@ class IStrategy(ABC): current_profit = trade.calc_profit_percent(current_rate) if self.stoploss_on_exchange: - stoplossflag = False + stoplossflag = SellCheckTuple(sell_flag=False, sell_type=SellType.NONE) else: stoplossflag = self.stop_loss_reached(current_rate=current_rate, trade=trade, current_time=date, current_profit=current_profit,