Only adjust stoploss if it's set.
This commit is contained in:
parent
1e3fc5e984
commit
b7bf3247b8
@ -587,7 +587,8 @@ class LocalTrade():
|
|||||||
self.amount = total_amount
|
self.amount = total_amount
|
||||||
self.fee_open_cost = self.fee_open * self.stake_amount
|
self.fee_open_cost = self.fee_open * self.stake_amount
|
||||||
self.recalc_open_trade_value()
|
self.recalc_open_trade_value()
|
||||||
self.adjust_stop_loss(self.open_rate, self.stop_loss_pct)
|
if self.stop_loss_pct is not None and self.open_rate is not None:
|
||||||
|
self.adjust_stop_loss(self.open_rate, self.stop_loss_pct)
|
||||||
|
|
||||||
|
|
||||||
def select_order(self, order_side: str, is_open: Optional[bool]) -> Optional[Order]:
|
def select_order(self, order_side: str, is_open: Optional[bool]) -> Optional[Order]:
|
||||||
|
Loading…
Reference in New Issue
Block a user