1
This commit is contained in:
parent
dda1ffc849
commit
977669302f
|
|
@ -2946,9 +2946,11 @@ class PositionManager:
|
|||
logger.info(f" → {symbol} 无止损/止盈单,将补建记录、自动挂止损止盈并纳入监控")
|
||||
# 不再因 is_clearly_manual 或 无 SL/TP 跳过,一律补建 + 挂 SL/TP + 监控
|
||||
entry_reason_sync = "sync_recovered_unknown_origin" if sync_unknown_origin else "sync_recovered"
|
||||
# 仅当 DB 中已有「同 symbol、同 entry_order_id、且 status=open」的记录时才跳过,避免已平仓旧单占用 order_id 导致误跳过补建
|
||||
if entry_order_id and hasattr(Trade, "get_by_entry_order_id"):
|
||||
try:
|
||||
if Trade.get_by_entry_order_id(entry_order_id):
|
||||
existing = Trade.get_by_entry_order_id(entry_order_id)
|
||||
if existing and existing.get("status") == "open" and existing.get("symbol") == symbol:
|
||||
continue
|
||||
except Exception:
|
||||
pass
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user