Add daily loss force-flatten at configurable equity limit

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-03 12:42:13 +08:00
parent b6c3266a9e
commit 2081bf2da9
17 changed files with 850 additions and 97 deletions
+9
View File
@@ -253,12 +253,21 @@
<label>开仓挂单超时(分钟)</label>
<input name="pending_order_timeout_min" type="number" step="1" min="1" max="60" value="{{ pending_order_timeout_min }}">
</div>
<div class="field">
<label>日亏损强平线(%权益)</label>
<input name="daily_loss_force_close_pct" type="number" step="0.1" min="0.1" max="50" value="{{ daily_loss_force_close_pct }}">
</div>
<div class="field">
<label>强平滑点预留(%权益)</label>
<input name="daily_loss_slippage_buffer_pct" type="number" step="0.1" min="0" max="20" value="{{ daily_loss_slippage_buffer_pct }}">
</div>
</div>
<button type="submit" class="btn-primary" style="margin-top:.75rem">保存交易设置</button>
<p class="hint" style="margin-top:.75rem;margin-bottom:0">
单仓保证金上限(默认 30%)用于<strong>新开仓</strong>校验与最大手数估算;综合保证金上限(默认 50%)在单仓模式下为滚仓合计上限、多仓模式下为全部持仓合计上限。固定金额计仓时<strong>先按止损算手数,再按单仓上限收紧</strong>
<strong>移动保本</strong>:达 1R 后止损移至开仓价 ± N 跳。
<strong>挂单超时</strong>:限价开仓未成交时,超过设定分钟数自动向柜台撤单(1~60 分钟)。
<strong>日亏损强平</strong>:当日亏损(已实现+浮亏)达「强平线」占权益比例时,无条件平掉全部持仓并当日禁止开仓;「滑点预留」为强平执行额外允许的最大亏损占权益比例(默认 2%+1%=3% 合计上限)。
<span class="text-muted">{{ small_account_margin_rec.label }}。</span>
CTP 账号与前置在下方「CTP 连接」中配置。
</p>