Alice — an open-source AI trading bot covering equities, crypto, commodities, forex, and macro
Fix ruff SIM108 in dashboard analysis endpoint
Camo67 committed
Oct 12, 2026 at 19:09 UTC
5f6990d3654e3298649a6fc257ca6470c2700d90
1 file changed
+1
-4
src/open_alice/dashboard/app.py
+1
-4
@@ -292,10 +292,7 @@ def create_dashboard_app() -> Any:
292
if strategy not in ("sma_crossover", "rsi", "macd", "bollinger"):
293
return jsonify({"error": f"unknown strategy: {strategy}"}), 400
294
try:
295
- if source == "mt5":
296
- df = _mt5_frame(symbol)
297
- else:
298
- df = fetch_ohlcv(symbol, period=period)
295
+ df = _mt5_frame(symbol) if source == "mt5" else fetch_ohlcv(symbol, period=period)
296
df = add_returns(df)
297
return jsonify(chart_payload(df, strategy))
298
except Exception as exc: