删除永续下单监控与划转强平,保留关键位监控并完成回归审计。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-07 13:04:21 +08:00
parent 7c5a6e25b2
commit c021c38e2d
39 changed files with 5841 additions and 10637 deletions
+13 -1
View File
@@ -2,11 +2,23 @@
from __future__ import annotations
from typing import Optional
from typing import Any, Optional
_WIN_EPS = 1e-9
def snapshot_stop_loss(initial_stop_loss: Any, stop_loss: Any) -> Optional[float]:
"""展示盈亏比时优先用开仓止损快照."""
for v in (initial_stop_loss, stop_loss):
try:
f = float(v)
if f > 0:
return f
except (TypeError, ValueError):
continue
return None
def classify_exit_by_levels(
direction,
trigger_price,