INNER CODE UNIT · Python
atr_val
alex-jb/orallexa-ai-trading-agent · app.py:426
atr_val = float(tr.rolling(14).mean().iloc[-1])
except Exception as e:
logger.warning("Price fetch failed for %s: %s", trade_ticker, e)
entry_price = 0.0
atr_val = None
# ── Check price alerts ────────────────────────────────────────
if entry_price > 0:
triggered = alert_mgr.check_all()
for ta in triggered:
st.toast(
f"ALERT: {ta['ticker']} hit ${ta['triggered_price']:.2f} "
f"({ta['direction']} ${ta['target']:.2f}) — {ta.get('note', '')}",
icon="🔔",
)
# 3A-3: manual price input when live price unavailable
if entry_price == 0.0: