9ba9733523
Co-authored-by: Cursor <cursoragent@cursor.com>
48 lines
2.3 KiB
HTML
48 lines
2.3 KiB
HTML
{% extends "base.html" %}
|
|
{% block title %}持仓监控 - 国内期货监控系统{% endblock %}
|
|
{% block content %}
|
|
<div class="split-grid">
|
|
<div class="card">
|
|
<h2>持仓录入</h2>
|
|
<div class="card-body">
|
|
<form action="{{ url_for('add_position') }}" method="post" class="form-compact">
|
|
<div class="form-line line-3">
|
|
<div class="symbol-wrap">
|
|
<input type="text" class="symbol-input" placeholder="主力合约" autocomplete="off" required>
|
|
<input type="hidden" name="symbol" required>
|
|
<input type="hidden" name="symbol_name">
|
|
<input type="hidden" name="market_code" required>
|
|
<input type="hidden" name="sina_code">
|
|
<div class="symbol-dropdown"></div>
|
|
<div class="symbol-selected"></div>
|
|
</div>
|
|
<input type="datetime-local" name="open_time" required title="开仓时间">
|
|
<input name="lots" type="number" step="1" min="1" value="1" placeholder="张数" required>
|
|
</div>
|
|
<div class="form-line line-3">
|
|
<input name="entry_price" type="number" step="0.0001" placeholder="成交价格" required>
|
|
<input name="stop_loss" type="number" step="0.0001" placeholder="止损" required>
|
|
<input name="take_profit" type="number" step="0.0001" placeholder="止盈" required>
|
|
</div>
|
|
<div class="form-line line-btn">
|
|
<button type="submit" class="btn-primary">添加持仓</button>
|
|
</div>
|
|
</form>
|
|
<p class="hint" style="margin-top:.5rem">方向根据止损与成交价自动判断;风险比例依赖系统设置中的实盘资金。</p>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="card">
|
|
<h2>实时持仓</h2>
|
|
<div class="card-body card-scroll" id="position-live-list">
|
|
{% if not positions %}
|
|
<div class="empty-hint">暂无持仓,左侧录入后显示</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
{% block extra_js %}
|
|
<script src="{{ url_for('static', filename='js/positions.js') }}"></script>
|
|
{% endblock %}
|