From 6977bce64ff42320959ce3cbdca9c99af128ec56 Mon Sep 17 00:00:00 2001 From: dekun Date: Wed, 10 Jun 2026 18:50:46 +0800 Subject: [PATCH] fix: tighten key monitor rule table typography and copy Use smaller fonts and shorter cell text so the rule reference fits better on the key monitor page. Co-authored-by: Cursor --- strategy_templates/key_monitor_panel.html | 17 +-- strategy_templates/key_monitor_rule_tips.html | 139 +++--------------- 2 files changed, 30 insertions(+), 126 deletions(-) diff --git a/strategy_templates/key_monitor_panel.html b/strategy_templates/key_monitor_panel.html index 9a66c6f..1128ee1 100644 --- a/strategy_templates/key_monitor_panel.html +++ b/strategy_templates/key_monitor_panel.html @@ -30,16 +30,15 @@ .key-row-collapse.key-history-failed .key-row-collapse-summary{color:#e8cfc8} .key-row-collapse.key-history-failed .key-history-brief,.key-row-collapse.key-history-failed .key-history-outcome-badge{color:#e8a090;background:rgba(232,160,144,.1);border:1px solid rgba(232,160,144,.28)} .key-rule-table-wrap{overflow-x:auto;margin:0 -2px} -.key-rule-table{width:100%;min-width:720px;border-collapse:collapse;font-size:.72rem;line-height:1.45} -.key-rule-table th,.key-rule-table td{border:1px solid #2a3348;padding:7px 9px;vertical-align:top;text-align:left} -.key-rule-table th{background:rgba(0,0,0,.28);color:#9ab;font-weight:600;white-space:nowrap} +.key-rule-table{width:100%;min-width:620px;border-collapse:collapse;font-size:.6rem;line-height:1.3} +.key-rule-table th,.key-rule-table td{border:1px solid #2a3348;padding:4px 6px;vertical-align:top;text-align:left} +.key-rule-table th{background:rgba(0,0,0,.28);color:#9ab;font-weight:600;white-space:nowrap;font-size:.58rem} .key-rule-table td{color:#c5cde0} -.key-rule-table .key-rule-type{color:#fff;font-weight:600;line-height:1.35} -.key-rule-table .key-rule-sub{color:#8fc8ff;font-size:.66rem;font-weight:500} -.key-rule-list{margin:0;padding-left:1.15em} -.key-rule-list li{margin:3px 0} -.key-rule-foot{margin:8px 0 0;font-size:.68rem;color:#8892b0;line-height:1.4} -.key-rule-foot code{font-size:.66rem;color:#8fc8ff} +.key-rule-table .key-rule-type{color:#fff;font-weight:600;line-height:1.25;white-space:nowrap} +.key-rule-table .key-rule-sub{color:#8fc8ff;font-size:.54rem;font-weight:500} +.key-rule-cell{word-break:break-word} +.key-rule-foot{margin:6px 0 0;font-size:.56rem;color:#8892b0;line-height:1.35} +.key-rule-foot code{font-size:.54rem;color:#8fc8ff} {% macro key_direction_label(k) -%} diff --git a/strategy_templates/key_monitor_rule_tips.html b/strategy_templates/key_monitor_rule_tips.html index 537b4ed..b1da036 100644 --- a/strategy_templates/key_monitor_rule_tips.html +++ b/strategy_templates/key_monitor_rule_tips.html @@ -3,138 +3,43 @@ - - - + + + - + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + +
监控类型方向与填写触发 / 门控条件类型填写门控 止盈止损执行方式执行
箱体突破
收敛突破
-
    -
  • 方向:必选做多 / 做空
  • -
  • 上沿 H / 下沿 L:箱体或收敛结构上下界(H > L)
  • -
  • 方案:标准突破 / 箱体1R·止盈1.5H / 趋势单(自填止盈)
  • -
  • 移动保本:添加时可勾选
  • -
-
-
    -
  • 周期 {{ r.tf }},取两根已闭合 K(突破棒索引 {{ r.breakout_bar }}、确认棒 {{ r.confirm_bar }})
  • -
  • 突破棒收盘越过关键位幅度 > {{ r.amp_min_pct }}%
  • -
  • 确认棒收盘须收于箱外(不得回到 [L, H] 内)
  • -
  • 突破棒成交量 > 前 {{ r.vol_ma_bars }} 根均量 × {{ r.vol_ratio_min }}
  • -
  • 24h 成交额排名 ≤ {{ r.vol_rank_max }}
  • -
  • 按确认收盘 E 计算计划盈亏比 > {{ r.min_rr }} : 1
  • -
-
-
    -
  • 标准突破:SL = 突破 K 极值外 {{ r.stop_outside_pct }}%;TP = E ± 1×箱体高度 H
  • -
  • 箱体1R·止盈1.5H:SL = E ∓ 1×H;TP = E ∓ 1.5×H
  • -
  • 趋势单:SL = 突破 K 极值外 {{ r.trend_stop_outside_pct }}%;TP = 表单自填价
  • -
-
-
    -
  • 门控全部通过 → 自动市价开仓(须开启实盘、持仓未达上限)
  • -
  • 开仓后写入「下单监控」,本条从关键位列表移除
  • -
  • 持仓已满时不可再添加箱体 / 收敛类型
  • -
-
方向必选;填 H/L
方案:标准 / 1R·1.5H / 趋势
可勾移动保本
{{ r.tf }} 两根闭合 K({{ r.breakout_bar }}/{{ r.confirm_bar }})
突破 >{{ r.amp_min_pct }}%;确认在箱外
量 >前{{ r.vol_ma_bars }}均×{{ r.vol_ratio_min }}
成交 Top{{ r.vol_rank_max }};RR >{{ r.min_rr }}
标准:SL 极值外{{ r.stop_outside_pct }}%,TP=E±H
1R:SL=E∓H,TP=E∓1.5H
趋势:SL 极值外{{ r.trend_stop_outside_pct }}%,TP 自填
门控过→市价开仓→下单监控
满仓不可再加
斐波回调
0.618 / 0.786
-
    -
  • 方向:必选做多 / 做空
  • -
  • 上沿 H / 下沿 L:斐波波段高低点
  • -
  • 系统按比率自动计算挂单价 E、止损 SL、止盈 TP
  • -
-
-
    -
  • 做多:E = H − ratio×(H−L),SL = L,TP = H
  • -
  • 做空:E = L + ratio×(H−L),SL = H,TP = L
  • -
  • 计划 RR 须 > {{ r.min_rr }} : 1 方可挂单
  • -
  • 标记价先触达止盈侧(多:≥H;空:≤L)→ 计划失效撤单
  • -
-
-
    -
  • SL / TP 由斐波公式固定,见左列
  • -
  • 成交后按仓位挂交易所 TP/SL
  • -
-
-
    -
  • 添加后挂限价单,等待成交
  • -
  • 成交 → 写入下单监控;未成交可手动删除
  • -
-
方向 + H/L 波段
系统算 E/SL/TP
多:E=H−rΔ,SL=L,TP=H
空:E=L+rΔ,SL=H,TP=L
RR >{{ r.min_rr }};先触 TP 侧失效
公式固定 SL/TP
成交后挂所
挂限价等成交
成交→下单监控
假突破
BTC / ETH
-
    -
  • 币种:仅 BTC、ETH
  • -
  • 做空:关键价位填高点
  • -
  • 做多:关键价位填低点
  • -
  • 同币种同时仅允许一条假突破监控
  • -
-
-
    -
  • 限价挂在关键价外侧 {{ r.fb_offset_pct }}%
  • -
  • 止损幅度 {{ r.fb_sl_pct }}%,计划 RR = {{ r.fb_rr }} : 1
  • -
  • 挂单有效期 {{ r.fb_valid_hours }} 小时,过期自动结案
  • -
-
-
    -
  • 系统按方向自动算 E / SL / TP(RR {{ r.fb_rr }})
  • -
  • 可勾选移动保本
  • -
-
-
    -
  • 添加后立即挂限价单
  • -
  • 成交 → 下单监控;过期 / 手动删除 → 关键位历史
  • -
-
空填高点 / 多填低点
同币仅 1 条
外侧 {{ r.fb_offset_pct }}% 限价
SL {{ r.fb_sl_pct }}%;RR {{ r.fb_rr }}
有效 {{ r.fb_valid_hours }}h
自动 E/SL/TP
可保本
即挂限价
成交/过期→历史
关键阻力位
关键支撑位
-
    -
  • 方向:自动「双向」,无需选择
  • -
  • 上沿:阻力 / 箱体上界
  • -
  • 下沿:支撑 / 箱体下界
  • -
-
-
    -
  • {{ r.tf }} 最近一根已闭合 K 收盘严格突破上沿(>)或下沿(<)
  • -
  • 上沿优先:同一根 K 不会双向同时触发
  • -
-
-
    -
  • 无自动止盈止损(仅提醒,不开仓)
  • -
-
-
    -
  • 企业微信提醒,最多 {{ r.alert_max }}
  • -
  • 两次提醒间隔 ≥ {{ r.alert_interval_min }} 分钟
  • -
  • 提醒完成或手动删除后记入历史
  • -
-
阻力 / 支撑双向;填上/下沿{{ r.tf }} 收盘破上沿或下沿
上沿优先
无(仅提醒)微信 ≤{{ r.alert_max }} 次
间隔 ≥{{ r.alert_interval_min }} 分
-

参数来自本实例 .env(如 KEY_BREAKOUT_AMP_MIN_PCTKEY_AUTO_MIN_PLANNED_RR 等);修改后须重启实例生效。

+

阈值来自 .env,修改后重启实例。