-
Notifications
You must be signed in to change notification settings - Fork 766
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(portfolio): improve daily balance calculation for futures an…
…d spot trading - Updated the save_daily_portfolio_balance function to streamline balance calculations for futures and spot trading. - For futures, wallet balance and PNLs are now summed correctly, while for spot trading, the portfolio value is retrieved from the first available strategy. - Enhanced clarity and maintainability of the code by restructuring balance accumulation logic. - Added handling for active entry orders in the Strategy class to ensure accurate total position values during spot trading.
- Loading branch information
Showing
2 changed files
with
20 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters