diff --git a/src/pages/trading/trading_system_page.py b/src/pages/trading/trading_system_page.py index 3a67dee..e28727e 100644 --- a/src/pages/trading/trading_system_page.py +++ b/src/pages/trading/trading_system_page.py @@ -243,16 +243,31 @@ def trading_system_page(): # Debug output to verify prefill data if prefill: - st.write("Debug - Prefill data:", prefill) + st.write("Debug - Prefill ", prefill) col1, col2 = st.columns(2) with col1: ticker = st.text_input("Ticker", value=str(prefill.get('ticker', ''))) entry_price = st.number_input("Entry Price", - value=prefill.get('entry_price', 0.0), + value=float(prefill.get('entry_price') or 0.0), min_value=0.0, step=0.01, format="%.2f") + shares = st.number_input("Shares", + value=int(prefill.get('shares') or 0), + min_value=0, + step=1) + with col2: + target_price = st.number_input("Target Price", + value=float(prefill.get('target_price') or 0.0), + min_value=0.0, + step=0.01, + format="%.2f") + stop_loss = st.number_input("Stop Loss", + value=float(prefill.get('stop_loss') or 0.0), + min_value=0.0, + step=0.01, + format="%.2f") shares = st.number_input("Shares", value=prefill.get('shares', 0), min_value=0,