Skip to content

Commit

Permalink
Fix marked down accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
miohtama committed Jan 30, 2025
1 parent 231b909 commit 8c810a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tradeexecutor/state/position.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def is_marked_down(self) -> bool:
See :py:meth:`mark_down`.
"""
return self.other_data["marked_down_at"] is not None
return self.other_data.get("marked_down_at") is not None

def has_automatic_close(self) -> bool:
"""This position has stop loss/take profit set."""
Expand Down

0 comments on commit 8c810a2

Please sign in to comment.