From c238bf45edaf306fbb18d3ba0bf9b7825eaf249f Mon Sep 17 00:00:00 2001 From: "Bobby (aider)" Date: Tue, 11 Feb 2025 06:59:10 -0800 Subject: [PATCH] feat: Add buy/sell direction selector to trading journal page --- src/streamlit_app.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/streamlit_app.py b/src/streamlit_app.py index 4493fd3..db14d9a 100644 --- a/src/streamlit_app.py +++ b/src/streamlit_app.py @@ -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)