Administrator
2026-09-23 cefd5c92bb1073f3bc26bda12ef093851558a0a4
fix(gateApi): 修复止损订单数量计算逻辑

- 将止损订单总数计算从 baseQty 改为 filledQty
- 确保止损只针对实际成交的初始仓位而非计划仓位
- 保持加仓部分仅执行止盈策略不变
1 files modified
4 ■■■■■ changed files
src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java 4 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
@@ -2019,7 +2019,7 @@
        }
        // [Gate] 止损只针对初始开仓仓位(baseQuantity),加仓部分只做止盈
        int totalOrders = baseQty / qty;
        int totalOrders = filledQty / qty;
        int[] orders = new int[gridCount];
        if (gridCount == 1) {
@@ -2082,7 +2082,7 @@
        }
        // [Gate] 止损只针对初始开仓仓位(baseQuantity),加仓部分只做止盈
        int totalOrders = baseQty / qty;
        int totalOrders = filledQty / qty;
        int[] orders = new int[gridCount];
        if (gridCount == 1) {