fix: Improve trade history display with correct price labels and direction
This commit is contained in:
parent
b8a561f37c
commit
9ef81fb589
@ -317,15 +317,12 @@ def trading_journal_page():
|
||||
col1, col2 = st.columns(2)
|
||||
with col1:
|
||||
if trade['direction'] == 'sell':
|
||||
st.metric("Sell Price", f"${trade['entry_price']:.2f}")
|
||||
st.metric("Exit Price", f"${trade['entry_price']:.2f}")
|
||||
else:
|
||||
st.metric("Entry Price", f"${trade['entry_price']:.2f}")
|
||||
st.metric("Shares", trade['shares'])
|
||||
direction = trade.get('direction')
|
||||
if isinstance(direction, str):
|
||||
st.metric("Type", direction.capitalize())
|
||||
else:
|
||||
st.metric("Type", "Buy")
|
||||
direction = trade.get('direction', 'buy')
|
||||
st.metric("Type", direction.capitalize())
|
||||
|
||||
with col2:
|
||||
if trade['direction'] == 'buy':
|
||||
|
||||
Loading…
Reference in New Issue
Block a user