Administrator
2026-07-15 522e0de6b879a910f2aa57b1af3fa49e8dc6f313
src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
@@ -666,9 +666,10 @@
//                        }
//                );
                // 空仓止盈:每1张持仓对应1个止盈位,从entry网格向下逐个挂
                // 空仓止盈:超额部分挂止盈,从entry网格向下逐个挂
                int shortBaseQty = Integer.parseInt(config.getBaseQuantity());
                int shortGridQty = Integer.parseInt(config.getQuantity());
                int shortTpCount = posSize / shortGridQty;
                int shortTpCount = posSize > shortBaseQty ? (posSize - shortBaseQty) / shortGridQty : 0;
                for (int i = 0; i < shortTpCount; i++) {
                    int tpGridId = shortGridElement.getId() - 2 * (i + 1);
@@ -731,9 +732,10 @@
//                        }
//                );
                // 多仓止盈:每1张持仓对应1个止盈位,从entry网格向上逐个挂
                // 多仓止盈:超额部分挂止盈,从entry网格向上逐个挂
                int longBaseQty = Integer.parseInt(config.getBaseQuantity());
                int longGridQty = Integer.parseInt(config.getQuantity());
                int longTpCount = posSize / longGridQty;
                int longTpCount = posSize > longBaseQty ? (posSize - longBaseQty) / longGridQty : 0;
                for (int i = 0; i < longTpCount; i++) {
                    int tpGridId = longGridElement.getId() + 2 * (i + 1);