mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
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'],
|
||||
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.
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user