mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
binance futures stoploss
This commit is contained in:
parent
ce9de243b7
commit
553da850ce
|
@ -45,7 +45,9 @@ class Binance(Exchange):
|
|||
:param side: "buy" or "sell"
|
||||
"""
|
||||
|
||||
return order['type'] == 'stop_loss_limit' and (
|
||||
ordertype = 'stop' if self.trading_mode == TradingMode.FUTURES else 'stop_loss_limit'
|
||||
|
||||
return order['type'] == ordertype and (
|
||||
(side == "sell" and stop_loss > float(order['info']['stopPrice'])) or
|
||||
(side == "buy" and stop_loss < float(order['info']['stopPrice']))
|
||||
)
|
||||
|
@ -67,7 +69,7 @@ class Binance(Exchange):
|
|||
else:
|
||||
rate = stop_price * (2 - limit_price_pct)
|
||||
|
||||
ordertype = "stop_loss_limit"
|
||||
ordertype = 'stop' if self.trading_mode == TradingMode.FUTURES else 'stop_loss_limit'
|
||||
|
||||
stop_price = self.price_to_precision(pair, stop_price)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user