refactor: Update portfolio value calculation to include cash and current market positions
This commit is contained in:
parent
735cfdfb65
commit
c6da08351f
@ -251,10 +251,10 @@ def trading_journal_page():
|
||||
avg_entry = summary['avg_entry_price']
|
||||
|
||||
position_value = current_price * shares
|
||||
total_invested_value += position_value
|
||||
total_invested_value += current_price * shares
|
||||
total_paper_pl += (current_price - avg_entry) * shares
|
||||
|
||||
# Calculate total portfolio value
|
||||
# Calculate total portfolio value (cash + invested value)
|
||||
total_portfolio_value = cash_balance + total_invested_value
|
||||
|
||||
with col1:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user