From 1962d3f8a79de721dcb935c975f338e15ee11fb3 Mon Sep 17 00:00:00 2001 From: yanweidong Date: Thu, 17 Sep 2026 10:09:57 +0800 Subject: [PATCH] fix bug --- py-client/strategy/trend/positions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py-client/strategy/trend/positions.py b/py-client/strategy/trend/positions.py index eaf2274..90828a0 100644 --- a/py-client/strategy/trend/positions.py +++ b/py-client/strategy/trend/positions.py @@ -130,7 +130,7 @@ def handle_profit( f"突破, PNL:{pnl_rate:.2f}%,网格={observation.current_grid}", ) if observation.state == GridState.STEADY: - return TradeDecision(False,f"持平, PNL:{pnl_rate:.2f}%,网格={observation.current_grid}",) + return TradeDecision(False,f"持平,网格={observation.current_grid}",) if runtime.orders.busy(position.stock_code, "SELL"): return TradeDecision(False, "卖出委托处理中") @@ -163,7 +163,7 @@ def handle_loss( hands=int(position.volume / 100), market_value=position.market_value ) if add_num >= len(LOSS_TIERS) or add_num < 0: - return TradeDecision(False, f"补仓次数无效:{add_num}") + return TradeDecision(False, f"次数无效:{add_num}") if pnl_rate > LOSS_TIERS[add_num]: return TradeDecision(False) if tick.last_price > 200 or position.market_value >= 20_000: