Skip to content

Commit

Permalink
fix _positions
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTheLion123 committed Jul 2, 2024
1 parent 0eddd15 commit 4476993
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tradeexecutor/analysis/trade_analyser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,10 +1042,11 @@ def _get_new_grouped_duration_and_append(
else:
# end new group
# credit supply should only be here
grouped_duration = _get_new_grouped_duration_and_append(grouped_duration, position, previous_position_closed_at)
grouped_duration = _get_new_grouped_duration_and_append(grouped_duration, position)
else:
raise ValueError("previous_position_closed_at is None. This should not happen.")

_positions.append(position)
last_closed_position_info = {
"grouped_duration": grouped_duration,
"position": position,
Expand Down

0 comments on commit 4476993

Please sign in to comment.