typing bugs

This commit is contained in:
misagh 2018-11-22 17:14:22 +01:00
parent bbe8e4e494
commit 3a1c378325
2 changed files with 3 additions and 3 deletions

View File

@ -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.

View File

@ -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,