Use bid1-only option closes with hard-disabled market exits.
Manual close checks liquidity only; target auto still requires 2x recycle hold once, then reuses the shared bid1 executor. Add /options/guide doc and update hedge-plan refs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -66,12 +66,12 @@
|
||||
|
||||
function closeGateHint(preview) {
|
||||
if (!preview) return "";
|
||||
if (preview.bid_invalid) {
|
||||
return preview.bid_invalid_reason || "当前买一无效,禁止按买盘自动平仓";
|
||||
if (preview.bid_invalid || preview.manual_close_blocked) {
|
||||
return preview.bid_invalid_reason || "当前买一无效,禁止买一平仓";
|
||||
}
|
||||
const gate = preview.close_gate || {};
|
||||
if (preview.close_gate_blocked || gate.ready === false) {
|
||||
return preview.close_gate_msg || gate.msg || "可回收需≥2×权利金并持续2分钟后才可平仓";
|
||||
if (preview.close_gate_blocked || (gate.ready === false && !gate.passed)) {
|
||||
return "自动平仓: " + (preview.close_gate_msg || gate.msg || "可回收需≥2×权利金并持续2分钟");
|
||||
}
|
||||
return "";
|
||||
}
|
||||
@@ -138,7 +138,7 @@
|
||||
const closeSheets = p.avail_pos != null && Number(p.avail_pos) > 0 ? p.avail_pos : p.pos;
|
||||
headActions =
|
||||
'<div class="pos-head-actions">' +
|
||||
'<button type="button" class="btn-primary opt-close-btn" data-inst="' + (p.inst_id || "") + '" data-sheets="' + closeSheets + '">多档平仓</button>' +
|
||||
'<button type="button" class="btn-primary opt-close-btn" data-inst="' + (p.inst_id || "") + '" data-sheets="' + closeSheets + '">买一平仓</button>' +
|
||||
"</div>";
|
||||
}
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user