Add AI trading supervisor with WeChat push and daily session
Proactive monitoring for manual/hub closes and new opens prevents overtrading via in-app alerts, configurable WeChat links, and supervisor chat. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -648,11 +648,12 @@
|
||||
<div id="page-ai" class="page hidden">
|
||||
<div class="page-head">
|
||||
<h1><span class="head-tag">AI</span> 教练</h1>
|
||||
<p class="page-desc">交易教练 / 普通聊天 · 右侧可回看历史会话</p>
|
||||
<p class="page-desc">交易教练 / 普通聊天 / 交易监管 · 右侧可回看历史会话</p>
|
||||
</div>
|
||||
<div class="ai-mobile-tabs" role="tablist" aria-label="AI 教练视图">
|
||||
<button type="button" class="ai-mobile-tab is-active" data-ai-tab="trading" role="tab" aria-selected="true">交易教练</button>
|
||||
<button type="button" class="ai-mobile-tab" data-ai-tab="general" role="tab" aria-selected="false">普通聊天</button>
|
||||
<button type="button" class="ai-mobile-tab" data-ai-tab="supervisor" role="tab" aria-selected="false">交易监管</button>
|
||||
<button type="button" class="ai-mobile-tab" data-ai-tab="history" role="tab" aria-selected="false">历史</button>
|
||||
<button type="button" class="ai-mobile-tab ai-mobile-tab-action" data-ai-tab="new" role="tab" aria-selected="false" title="新开对话">新开</button>
|
||||
</div>
|
||||
@@ -662,6 +663,7 @@
|
||||
<div class="ai-bot-bar" role="tablist" aria-label="聊天机器人">
|
||||
<button type="button" class="ai-bot-tab is-active" data-bot="trading" role="tab" aria-selected="true">交易教练</button>
|
||||
<button type="button" class="ai-bot-tab" data-bot="general" role="tab" aria-selected="false">普通聊天</button>
|
||||
<button type="button" class="ai-bot-tab" data-bot="supervisor" role="tab" aria-selected="false">交易监管</button>
|
||||
</div>
|
||||
<button type="button" id="btn-ai-chat-new" class="primary ai-chat-new-btn">新开对话</button>
|
||||
</div>
|
||||
@@ -902,6 +904,50 @@
|
||||
</form>
|
||||
<div id="macro-event-list" class="macro-event-list"></div>
|
||||
</div>
|
||||
<div class="settings-supervisor-panel card">
|
||||
<h3 class="settings-display-title">交易监管 · 企业微信</h3>
|
||||
<p class="settings-display-hint">
|
||||
与四所实例策略通知独立;手动/中控开平仓与新开仓会推送至此 Webhook。链接可在下方单独修改。
|
||||
</p>
|
||||
<label class="chk-label settings-display-chk">
|
||||
<input type="checkbox" id="supervisor-enabled" checked />
|
||||
启用交易监管推送
|
||||
</label>
|
||||
<label class="chk-label settings-display-chk">
|
||||
<input type="checkbox" id="supervisor-wechat-program" checked />
|
||||
程序止盈/止损也发微信(鼓励向)
|
||||
</label>
|
||||
<div class="settings-grid supervisor-settings-grid">
|
||||
<div class="field field-wide">
|
||||
<label>企业微信 Webhook</label>
|
||||
<input id="supervisor-wechat-webhook" type="text" placeholder="https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=..." autocomplete="off" />
|
||||
</div>
|
||||
<div class="field field-wide">
|
||||
<label>微信消息跳转链接(可改)</label>
|
||||
<input id="supervisor-wechat-link" type="text" placeholder="https://你的域名/ai?mode=supervisor" autocomplete="off" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>消息前缀</label>
|
||||
<input id="supervisor-wechat-prefix" type="text" value="【交易监管】" autocomplete="off" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>日手动平警告阈值</label>
|
||||
<input id="supervisor-daily-warn" type="number" min="1" step="1" value="2" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>最短两笔间隔(分钟)</label>
|
||||
<input id="supervisor-interval-warn" type="number" min="1" step="1" value="15" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>30 分钟内笔数阈值</label>
|
||||
<input id="supervisor-freq-30m" type="number" min="1" step="1" value="2" />
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>平仓后再开仓(分钟)</label>
|
||||
<input id="supervisor-reopen-min" type="number" min="1" step="1" value="30" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="toolbar">
|
||||
<button type="button" id="btn-settings-save" class="primary">保存设置</button>
|
||||
<button type="button" id="btn-settings-add">添加交易所</button>
|
||||
|
||||
Reference in New Issue
Block a user