INNER CODE UNIT · Python
risk_pct
alex-jb/orallexa-ai-trading-agent · app.py:239
risk_pct = risk_pct_input / 100.0
enable_claude = st.checkbox("Claude AI overlay", value=True)
enable_rag = st.checkbox("RAG context", value=True)
analyze_btn = st.button("Analyze", type="primary", use_container_width=True)
st.divider()
# ── Price Alerts (sidebar) ────────────────────────────────────
from bot.alerts import AlertManager, PriceAlert
alert_mgr = AlertManager()
with st.expander("Price Alerts"):
al_dir = st.selectbox("Condition", ["above", "below"], key="al_dir")
al_price = st.number_input("Target $", value=0.0, step=0.50, key="al_price", min_value=0.0)
al_note = st.text_input("Note (optional)", key="al_note")
if st.button("Add Alert") and al_price > 0: