Administrator
2026-05-19 65933719b860fe4267e72b3aeb8becee25435671
src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
@@ -631,6 +631,7 @@
            GridElement baseGridElement = GridElement.findById(0);
            TraderParam baseLongTraderParam = config.getBaseLongTraderParam();
            baseGridElement.setLongOrderId(baseLongTraderParam.getEntryOrderId());
            baseGridElement.setHasLongOrder(true);
            //0位置的网格的多单止盈
            BigDecimal upTakeProfitPrice = baseGridElement.getLongTraderParam().getTakeProfitPrice();
            executor.placeTakeProfit(
@@ -649,6 +650,7 @@
            //0位置的网格的空单止盈
            TraderParam baseShortTraderParam = config.getBaseShortTraderParam();
            baseGridElement.setShortOrderId(baseShortTraderParam.getEntryOrderId());
            baseGridElement.setHasShortOrder(true);
            BigDecimal downTakeProfitPrice = baseGridElement.getShortTraderParam().getTakeProfitPrice();
            executor.placeTakeProfit(
                    downTakeProfitPrice,
@@ -1008,7 +1010,7 @@
            if (downGridElement != null){
                TraderParam downLongTraderParam = downGridElement.getLongTraderParam();
                if (!downGridElement.isHasShortOrder()){
                if (!downGridElement.isHasLongOrder()){
                    executor.placeConditionalEntryOrder(
                            downLongTraderParam.getEntryPrice(),
                            FuturesPriceTrigger.RuleEnum.NUMBER_1,
@@ -1029,6 +1031,7 @@
                BigDecimal downGridPrice = downGridElement.getGridPrice();
                if (
                        !downGridElement.isHasShortOrder() &&
                                downGridPrice.compareTo(currentPrice) < 0 &&
                                downGridPrice.compareTo(longEntryPrice) <= 0 &&
                                downGridPrice.compareTo(shortEntryPrice) >= 0
                ){
@@ -1190,6 +1193,7 @@
                BigDecimal downGridPrice = downGridElement.getGridPrice();
                if (
                        !downGridElement.isHasLongOrder() &&
                                downGridPrice.compareTo(currentPrice) > 0 &&
                                downGridPrice.compareTo(longEntryPrice) <= 0 &&
                                downGridPrice.compareTo(shortEntryPrice) >= 0
                ){