Skip to content

Commit 6a223e4

Browse files
committed
Fix stop loss and take profit initialization
1 parent a252489 commit 6a223e4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

investing_algorithm_framework/app/strategy.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,12 @@ def __init__(
113113
f"Interval not set for strategy instance {self.strategy_id}"
114114
)
115115

116-
self.stop_losses = stop_losses
117-
self.take_profits = take_profits
116+
117+
if stop_losses is not None:
118+
self.stop_losses = stop_losses
119+
120+
if take_profits is not None:
121+
self.take_profits = take_profits
118122

119123
# context initialization
120124
self._context = None

0 commit comments

Comments
 (0)