删除永续下单监控与划转强平,保留关键位监控并完成回归审计。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user