set initial_stop_loss in stoploss helper
This commit is contained in:
parent
f566d83839
commit
737a62be52
@ -310,8 +310,11 @@ class LocalTrade():
|
|||||||
self.stop_loss = max(stop_loss, liquidation_price)
|
self.stop_loss = max(stop_loss, liquidation_price)
|
||||||
else:
|
else:
|
||||||
self.stop_loss = liquidation_price
|
self.stop_loss = liquidation_price
|
||||||
|
self.initial_stop_loss = liquidation_price
|
||||||
self.liquidation_price = liquidation_price
|
self.liquidation_price = liquidation_price
|
||||||
else:
|
else:
|
||||||
|
if not self.stop_loss:
|
||||||
|
self.initial_stop_loss = stop_loss
|
||||||
self.stop_loss = stop_loss
|
self.stop_loss = stop_loss
|
||||||
|
|
||||||
def set_stop_loss(self, stop_loss: float):
|
def set_stop_loss(self, stop_loss: float):
|
||||||
|
Loading…
Reference in New Issue
Block a user