Define entry styles: trend/reversal x 3 patterns, plus messy other.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{% block title %}统计看板 · {{ app_name }}{% endblock %}
|
||||
{% block content %}
|
||||
<h2 style="margin:0 0 6px">统计看板</h2>
|
||||
<p class="muted" style="margin:0 0 10px">程序汇总成交数据;入场形式分类确定后再叠加维度。</p>
|
||||
<p class="muted" style="margin:0 0 10px">程序汇总:顺势/反转 × 三种结构手法,其他=乱作。</p>
|
||||
|
||||
<div style="display:flex;gap:8px;margin-bottom:14px;flex-wrap:wrap">
|
||||
<a class="btn secondary" href="{{ url_for('records_page', machine_id=selected_machine_id) if selected_machine_id else url_for('records_page') }}">交易列表</a>
|
||||
@@ -65,7 +65,60 @@
|
||||
<div class="card">
|
||||
<div class="muted">入场形式标注</div>
|
||||
<div class="stat" style="font-size:22px">{{ stats.annotated }} <span class="muted" style="font-size:14px">/ {{ stats.total }}</span></div>
|
||||
<div class="muted" style="margin-top:6px">未标注 {{ stats.unannotated }}(分类确定后再细拆)</div>
|
||||
<div class="muted" style="margin-top:6px">未标注 {{ stats.unannotated }}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid cols-2" style="margin-top:14px">
|
||||
<div class="card">
|
||||
<h3>按大类(顺势 / 反转 / 其他)</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>大类</th><th>笔数</th><th>胜率</th><th>盈亏</th><th>平均持仓</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for g in stats.by_category %}
|
||||
<tr>
|
||||
<td>{{ g.label }}</td>
|
||||
<td>{{ g.count }}</td>
|
||||
<td>{{ '%.1f'|format(g.win_rate) }}%</td>
|
||||
<td style="color:{% if g.profit>0 %}var(--green){% elif g.profit<0 %}var(--red){% else %}inherit{% endif %}">
|
||||
{{ '%.2f'|format(g.profit) }}
|
||||
</td>
|
||||
<td class="muted">{{ g.avg_hold }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr><td colspan="5" class="muted">暂无数据</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>按入场形式(细项)</h3>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>形式</th><th>笔数</th><th>胜率</th><th>盈亏</th><th>平均持仓</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for g in stats.by_style %}
|
||||
<tr>
|
||||
<td>{{ g.label }}</td>
|
||||
<td>{{ g.count }}</td>
|
||||
<td>{{ '%.1f'|format(g.win_rate) }}%</td>
|
||||
<td style="color:{% if g.profit>0 %}var(--green){% elif g.profit<0 %}var(--red){% else %}inherit{% endif %}">
|
||||
{{ '%.2f'|format(g.profit) }}
|
||||
</td>
|
||||
<td class="muted">{{ g.avg_hold }}</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr><td colspan="5" class="muted">暂无数据</td></tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user