Administrator
2024-06-03 6729e5d25dfecf068fc41771f85753871ccffefa
trade/trade_strategy.py
@@ -79,6 +79,11 @@
                    limit_up_price = gpcode_manager.get_limit_up_price(code)
                    order_ref = huaxin_util.create_order_ref()
                    try:
                        # 如果卖量比持仓还大,就全部卖完
                        position_volume = PositionManager().get_code_volume_cache(code)
                        if position_volume and volume >= position_volume:
                            # 表示全部卖完
                            volume = -1
                        result = huaxin_sell_util.start_sell(code, volume, price_type, limit_up_price, limit_down_price,
                                                             current_price, blocking=True, request_id=request_id,
                                                             order_ref=order_ref)