typing bugs
This commit is contained in:
parent
bbe8e4e494
commit
3a1c378325
@ -479,13 +479,13 @@ class FreqtradeBot(object):
|
|||||||
order_id = self.exchange.buy(pair=pair, ordertype=self.strategy.order_types['buy'],
|
order_id = self.exchange.buy(pair=pair, ordertype=self.strategy.order_types['buy'],
|
||||||
amount=amount, rate=buy_limit)['id']
|
amount=amount, rate=buy_limit)['id']
|
||||||
|
|
||||||
stoploss_order_id: int = None
|
stoploss_order_id = None
|
||||||
|
|
||||||
# Check if stoploss should be added on exchange
|
# Check if stoploss should be added on exchange
|
||||||
# If True then here immediately after buy we should
|
# If True then here immediately after buy we should
|
||||||
# Add the stoploss order
|
# Add the stoploss order
|
||||||
if self.strategy.stoploss_on_exchange:
|
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)
|
stop_price = buy_limit * (1 + stoploss)
|
||||||
|
|
||||||
# limit price should be less than stop price.
|
# limit price should be less than stop price.
|
||||||
|
@ -228,7 +228,7 @@ class IStrategy(ABC):
|
|||||||
current_profit = trade.calc_profit_percent(current_rate)
|
current_profit = trade.calc_profit_percent(current_rate)
|
||||||
|
|
||||||
if self.stoploss_on_exchange:
|
if self.stoploss_on_exchange:
|
||||||
stoplossflag = False
|
stoplossflag = SellCheckTuple(sell_flag=False, sell_type=SellType.NONE)
|
||||||
else:
|
else:
|
||||||
stoplossflag = self.stop_loss_reached(current_rate=current_rate, trade=trade,
|
stoplossflag = self.stop_loss_reached(current_rate=current_rate, trade=trade,
|
||||||
current_time=date, current_profit=current_profit,
|
current_time=date, current_profit=current_profit,
|
||||||
|
Loading…
Reference in New Issue
Block a user