feat: Add buy/sell direction selector to trading journal page
This commit is contained in:
parent
695259f3be
commit
c238bf45ed
@ -149,6 +149,13 @@ def trading_journal_page():
|
|||||||
|
|
||||||
ticker = st.text_input("Ticker Symbol").upper()
|
ticker = st.text_input("Ticker Symbol").upper()
|
||||||
|
|
||||||
|
# Add direction selection
|
||||||
|
direction = st.selectbox(
|
||||||
|
"Direction",
|
||||||
|
["Buy", "Sell"],
|
||||||
|
key="trade_direction"
|
||||||
|
)
|
||||||
|
|
||||||
if ticker:
|
if ticker:
|
||||||
# Show existing positions for this ticker
|
# Show existing positions for this ticker
|
||||||
existing_positions = get_position_summary(ticker)
|
existing_positions = get_position_summary(ticker)
|
||||||
@ -206,7 +213,8 @@ def trading_journal_page():
|
|||||||
position_id=position_id,
|
position_id=position_id,
|
||||||
followed_rules=followed_rules,
|
followed_rules=followed_rules,
|
||||||
entry_reason=entry_reason,
|
entry_reason=entry_reason,
|
||||||
notes=notes
|
notes=notes,
|
||||||
|
direction=direction.lower() # Add direction parameter
|
||||||
)
|
)
|
||||||
|
|
||||||
add_trade(trade)
|
add_trade(trade)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user