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)
|
col1, col2 = st.columns(2)
|
||||||
with col1:
|
with col1:
|
||||||
if trade['direction'] == 'sell':
|
if trade['direction'] == 'sell':
|
||||||
st.metric("Sell Price", f"${trade['entry_price']:.2f}")
|
st.metric("Exit Price", f"${trade['entry_price']:.2f}")
|
||||||
else:
|
else:
|
||||||
st.metric("Entry Price", f"${trade['entry_price']:.2f}")
|
st.metric("Entry Price", f"${trade['entry_price']:.2f}")
|
||||||
st.metric("Shares", trade['shares'])
|
st.metric("Shares", trade['shares'])
|
||||||
direction = trade.get('direction')
|
direction = trade.get('direction', 'buy')
|
||||||
if isinstance(direction, str):
|
st.metric("Type", direction.capitalize())
|
||||||
st.metric("Type", direction.capitalize())
|
|
||||||
else:
|
|
||||||
st.metric("Type", "Buy")
|
|
||||||
|
|
||||||
with col2:
|
with col2:
|
||||||
if trade['direction'] == 'buy':
|
if trade['direction'] == 'buy':
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user