Skip to content

Commit 9bfa659

Browse files
committed
Fixed Trailing stop loss init after cold start.
1 parent a0a2528 commit 9bfa659

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Bot/Strategy/StopLossStrategy.py

+3
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ def adjust_stoploss_price(self, current_price=None):
8686
if not has_completed_targets:
8787
return
8888

89+
if not current_price:
90+
return
91+
8992
trialing_val = self.trade.sl_settings.val.get_val(current_price)
9093
expected_stop_loss = current_price + (-1 if self.trade.is_sell() else 1) * trialing_val
9194

0 commit comments

Comments
 (0)