feat: unify key monitor UI with one-line summary and expandable details across all exchanges
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -5431,6 +5431,12 @@ def render_main_page(page="trade"):
|
||||
orphan_positions = collect_orphan_exchange_positions(order_list, conn)
|
||||
except Exception as exc:
|
||||
print(f"[render_main_page] orphan positions: {exc}")
|
||||
key_gate_rule_text = (
|
||||
f"【箱体/收敛】{KLINE_TIMEFRAME} 两根闭合K|突破越过关键位 0.03%~0.5%|"
|
||||
f"确认K收于箱外|量能>前20均量×1.3|日成交前30|"
|
||||
f"偏离关键位 > {KEY_BREAKOUT_LIMIT_PCT}% 不提醒|"
|
||||
f"【阻力/支撑】收盘突破任一侧即提醒 {KEY_ALERT_MAX_TIMES} 次(间隔 {KEY_ALERT_INTERVAL_MINUTES} 分),不自动开仓"
|
||||
)
|
||||
conn.close()
|
||||
return render_template(
|
||||
"index.html",
|
||||
@@ -5502,6 +5508,7 @@ def render_main_page(page="trade"):
|
||||
journal_chart_default_limit=JOURNAL_CHART_DEFAULT_LIMIT,
|
||||
journal_chart_default_anchor=JOURNAL_CHART_DEFAULT_ANCHOR,
|
||||
exchange_display=EXCHANGE_DISPLAY_NAME,
|
||||
key_gate_rule_text=key_gate_rule_text,
|
||||
**strategy_extra,
|
||||
)
|
||||
|
||||
@@ -5512,6 +5519,12 @@ def index():
|
||||
return redirect("/trade")
|
||||
|
||||
|
||||
@app.route("/key_monitor")
|
||||
@login_required
|
||||
def key_monitor_page():
|
||||
return render_main_page("key_monitor")
|
||||
|
||||
|
||||
@app.route("/trade")
|
||||
@login_required
|
||||
def trade_page():
|
||||
@@ -6284,7 +6297,7 @@ def add_key():
|
||||
conn.commit()
|
||||
conn.close()
|
||||
flash(f"添加成功({symbol} 日成交量排名 {rank}/{total})")
|
||||
return redirect("/")
|
||||
return redirect("/key_monitor")
|
||||
|
||||
@app.route("/add_order", methods=["POST"])
|
||||
@login_required
|
||||
|
||||
Reference in New Issue
Block a user