Skip to content

Commit

Permalink
Merge pull request #456 from yakir4123/yakir/fix/cancel-exit-order
Browse files Browse the repository at this point in the history
fix(Strategy): cancel exit orders
  • Loading branch information
saleh-mir committed May 29, 2024
2 parents ce799d0 + d02edea commit 2a46db5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions jesse/strategies/Strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ def _detect_and_handle_entry_and_exit_modifications(self) -> None:
self.position.is_open
and (self.stop_loss is not None and self.take_profit is not None)
and np.array_equal(self.stop_loss, self.take_profit)
and self.stop_loss != []
):
raise exceptions.InvalidStrategy(
'stop-loss and take-profit should not be exactly the same. Just use either one of them and it will do.')
Expand Down

0 comments on commit 2a46db5

Please sign in to comment.