feat: Add buy/sell direction selector to trading journal page

This commit is contained in:
Bobby (aider) 2025-02-11 06:59:10 -08:00
parent 695259f3be
commit c238bf45ed

View File

@ -149,6 +149,13 @@ def trading_journal_page():
ticker = st.text_input("Ticker Symbol").upper()
# Add direction selection
direction = st.selectbox(
"Direction",
["Buy", "Sell"],
key="trade_direction"
)
if ticker:
# Show existing positions for this ticker
existing_positions = get_position_summary(ticker)
@ -206,7 +213,8 @@ def trading_journal_page():
position_id=position_id,
followed_rules=followed_rules,
entry_reason=entry_reason,
notes=notes
notes=notes,
direction=direction.lower() # Add direction parameter
)
add_trade(trade)