This commit is contained in:
dekun
2026-05-23 11:20:45 +08:00
parent 4b185133c4
commit fc8f9b70da
14 changed files with 294 additions and 79 deletions
+20
View File
@@ -4192,6 +4192,13 @@ def render_main_page(page="trade"):
f"自动开仓盈亏比 > {KEY_AUTO_MIN_PLANNED_RR}:1|日成交量排名前 {KEY_DAILY_VOLUME_RANK_MAX}"
f"斐波:添加后立即挂限价 @ E,失效按标记价触达 H/L(未成交撤单)"
)
strategy_extra = {}
if page in ("strategy_trend", "strategy_roll"):
from strategy_ui import strategy_page_template_vars
strategy_extra = strategy_page_template_vars(
conn, page, default_risk_percent=float(RISK_PERCENT)
)
conn.close()
return render_template(
"index.html",
@@ -4242,6 +4249,7 @@ def render_main_page(page="trade"):
entry_reason_other_value=ENTRY_REASON_OTHER,
key_gate_rule_text=key_gate_rule_text,
key_auto_min_planned_rr=KEY_AUTO_MIN_PLANNED_RR,
**strategy_extra,
)
@@ -5950,6 +5958,18 @@ except Exception as _hub_err:
print(f"[hub_bridge] okx: {_hub_err}")
@app.route("/strategy/trend")
@login_required
def strategy_trend_page():
return render_main_page("strategy_trend")
@app.route("/strategy/roll")
@login_required
def strategy_roll_page():
return render_main_page("strategy_roll")
from strategy_register import install_strategy_trading
install_strategy_trading(app, _REPO_ROOT, app_module=sys.modules[__name__])