diff --git a/src/pages/journal/trading_journal_page.py b/src/pages/journal/trading_journal_page.py index 83220be..3b75c38 100644 --- a/src/pages/journal/trading_journal_page.py +++ b/src/pages/journal/trading_journal_page.py @@ -334,8 +334,13 @@ def trading_journal_page(): if trade.get('stop_loss'): st.metric("Stop Loss", f"${trade['stop_loss']:.2f}") if trade.get('exit_price'): - st.metric("Exit Price", f"${trade['exit_price']:.2f}") - st.metric("Exit Date", format_datetime(trade['exit_date'])) + try: + exit_price = float(trade['exit_price']) + st.metric("Exit Price", f"${exit_price:.2f}") + st.metric("Exit Date", format_datetime(trade['exit_date'])) + except (ValueError, TypeError): + st.metric("Exit Price", "N/A") + st.metric("Exit Date", format_datetime(trade['exit_date'])) if trade.get('strategy'): st.text(f"Strategy: {trade['strategy']}")