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
@@ -5661,6 +5661,13 @@ def render_main_page(page="trade"):
f"箱体/收敛可选 SL/TP 方案(标准 / 箱体1R·止盈1.5H / 趋势单+自填止盈)|移动保本默认关|"
f"斐波:限价 @ E(SL/TP 为 H/L),可选移动保本|趋势止损外侧 {KEY_TREND_STOP_OUTSIDE_PCT}%"
)
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",
@@ -5718,6 +5725,7 @@ def render_main_page(page="trade"):
key_gate_rule_text=key_gate_rule_text,
kline_timeframe=KLINE_TIMEFRAME,
exchange_pnl_sync=exchange_pnl_sync,
**strategy_extra,
)
@@ -7735,6 +7743,18 @@ except Exception as _hub_err:
print(f"[hub_bridge] gate: {_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__])