38 lines
1.5 KiB
HTML
38 lines
1.5 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}交易复盘 · {{ app_name }}{% endblock %}
|
|
{% block content %}
|
|
<h2 style="margin:0 0 6px">交易记录与复盘</h2>
|
|
<p class="muted" style="margin:0 0 14px">参考 crypto_monitor 复盘流程:列表筛选 → 点开详情 → 四周期 K 线 + 入场形式标注。</p>
|
|
<div class="card">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th><th>品种</th><th>方向</th><th>手数</th><th>开仓价</th><th>平仓价</th>
|
|
<th>盈亏</th><th>账户</th><th>机器</th><th>入场形式</th><th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for t in trades %}
|
|
<tr>
|
|
<td>{{ t.id }}</td>
|
|
<td>{{ t.symbol }}</td>
|
|
<td><span class="tag {% if t.side=='buy' %}green{% else %}red{% endif %}">{{ t.side }}</span></td>
|
|
<td>{{ t.volume }}</td>
|
|
<td>{{ t.open_price }}</td>
|
|
<td>{{ t.close_price if t.close_price is not none else '—' }}</td>
|
|
<td style="color:{% if t.profit and t.profit>0 %}var(--green){% elif t.profit and t.profit<0 %}var(--red){% else %}inherit{% endif %}">
|
|
{{ t.profit if t.profit is not none else '—' }}
|
|
</td>
|
|
<td>{{ t.account_name or '—' }}</td>
|
|
<td>{{ t.machine_name or '—' }}</td>
|
|
<td>{{ t.entry_style or '—' }}</td>
|
|
<td><a href="{{ url_for('record_detail', tid=t.id) }}">打开复盘</a></td>
|
|
</tr>
|
|
{% else %}
|
|
<tr><td colspan="11" class="muted">暂无数据。客户端上报成交后出现在此。</td></tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endblock %}
|