From 2539ebc30063c58b1d69c206e1514e9f78b5d20e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=96=87=E8=96=87=E5=AE=89?= Date: Thu, 15 Jan 2026 11:24:32 +0800 Subject: [PATCH] a --- trading_system/position_manager.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/trading_system/position_manager.py b/trading_system/position_manager.py index 0bd5172..c4afb96 100644 --- a/trading_system/position_manager.py +++ b/trading_system/position_manager.py @@ -599,14 +599,14 @@ class PositionManager: # 部分平仓50% partial_quantity = quantity * 0.5 try: - # 部分平仓 - close_side = 'SELL' if position_info['side'] == 'BUY' else 'BUY' - partial_order = await self.client.place_order( - symbol=symbol, - side=close_side, - quantity=partial_quantity, - order_type='MARKET' - ) + # 部分平仓 + close_side = 'SELL' if position_info['side'] == 'BUY' else 'BUY' + partial_order = await self.client.place_order( + symbol=symbol, + side=close_side, + quantity=partial_quantity, + order_type='MARKET' + ) if partial_order: position_info['partialProfitTaken'] = True position_info['remainingQuantity'] = remaining_quantity - partial_quantity