From a34b6ba448ae8d2f01a895d20bd8a6d80fba8cbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=87=E8=96=87=E5=AE=89?= Date: Thu, 26 Feb 2026 17:36:01 +0800 Subject: [PATCH] 1 --- trading_system/position_manager.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/trading_system/position_manager.py b/trading_system/position_manager.py index 47a2413..abce900 100644 --- a/trading_system/position_manager.py +++ b/trading_system/position_manager.py @@ -662,7 +662,8 @@ class PositionManager: entry_order_id = order.get("orderId") if isinstance(order, dict) else None except Exception: entry_order_id = None - break + # 市价兜底下单后,结束追价循环 + break else: logger.info(f"{symbol} [智能入场] 限价超时,但偏离{drift_ratio*100:.2f}%>{max_drift_ratio*100:.2f}%,取消并放弃本次交易") try: @@ -670,7 +671,7 @@ class PositionManager: except Exception: pass self._pending_entry_orders.pop(symbol, None) - return None + return None # 震荡/不允许市价兜底:尝试追价(减小 offset -> 更靠近当前价),但不突破追价上限 try: