2
This commit is contained in:
parent
ed0c6754e0
commit
30c5635570
|
|
@ -662,7 +662,6 @@ class PositionManager:
|
|||
entry_order_id = order.get("orderId") if isinstance(order, dict) else None
|
||||
except Exception:
|
||||
entry_order_id = None
|
||||
# 市价兜底下单后,结束追价循环
|
||||
break
|
||||
else:
|
||||
logger.info(f"{symbol} [智能入场] 限价超时,但偏离{drift_ratio*100:.2f}%>{max_drift_ratio*100:.2f}%,取消并放弃本次交易")
|
||||
|
|
@ -2107,14 +2106,6 @@ class PositionManager:
|
|||
lock_pct = 0.03
|
||||
if lock_pct and lock_pct > 1:
|
||||
lock_pct = lock_pct / 100.0
|
||||
# 诊断:盈利达标时打印一次,便于排查「盈利高却未移止损」
|
||||
if pnl_percent_margin >= (lock_pct * 100) or pnl_percent_margin > (trailing_activation * 100):
|
||||
logger.info(
|
||||
f"{symbol} [定时检查-保本/移动止损] roe={pnl_percent_margin:.2f}% | "
|
||||
f"保本阈值={lock_pct*100:.0f}% 已设保本={position_info.get('breakevenStopSet', False)} | "
|
||||
f"移动止损阈值={trailing_activation*100:.0f}% 已激活={position_info.get('trailingStopActivated', False)} | "
|
||||
f"当前止损={position_info.get('stopLoss')}"
|
||||
)
|
||||
|
||||
if not position_info.get('trailingStopActivated', False):
|
||||
# 盈利达一定比例时尽早将止损移至含手续费保本(与实时监控一致)
|
||||
|
|
@ -4256,14 +4247,6 @@ class PositionManager:
|
|||
lock_pct = 0.03 # 未配置时默认 3% 移至保本
|
||||
if lock_pct and lock_pct > 1:
|
||||
lock_pct = lock_pct / 100.0
|
||||
# 诊断:盈利达标时打印一次,便于排查「盈利高却未移止损」
|
||||
if pnl_percent_margin >= (lock_pct * 100) or pnl_percent_margin > (trailing_activation * 100):
|
||||
logger.info(
|
||||
f"[账号{self.account_id}] {symbol} [实时监控-保本/移动止损] roe={pnl_percent_margin:.2f}% | "
|
||||
f"保本阈值={lock_pct*100:.0f}% 已设保本={position_info.get('breakevenStopSet', False)} | "
|
||||
f"移动止损阈值={trailing_activation*100:.0f}% 已激活={position_info.get('trailingStopActivated', False)} | "
|
||||
f"当前止损={position_info.get('stopLoss')}"
|
||||
)
|
||||
|
||||
if not position_info.get('trailingStopActivated', False):
|
||||
# 盈利达一定比例时尽早将止损移至含手续费保本,避免先盈后亏
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user