Skip to content

Conversation

dboyliao
Copy link
Collaborator

@dboyliao dboyliao commented Oct 3, 2025

No description provided.

@dboyliao dboyliao requested a review from c9s October 3, 2025 14:33
return err
}
if len(allTrades) == 0 {
log.Warnf("no trades found for %s from %s to %s, skip profit fixing", symbol, since.String(), until.String())
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use "no trades found between t1 and t2"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

return err
}
// update position open time and changed time
position.OpenedAt = since
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use the time from the first trade

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

}
// update position open time and changed time
position.OpenedAt = since
position.ChangedAt = allTrades[len(allTrades)-1].Time.Time()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this field will be updated when a trade is added to the position?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right.
Will remove it

@dboyliao dboyliao requested a review from c9s October 3, 2025 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants