Administrator
2026-05-21 6d2c1838edb17459daad0a37806b8ac30700a0e2
src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
@@ -342,6 +342,16 @@
        lastKlinePrice = closePrice;
        updateUnrealizedPnl();
        if (state == StrategyState.STOPPED) {
            try {
                futuresApi.cancelPriceTriggeredOrderList(SETTLE, config.getContract());
            } catch (ApiException e) {
                e.printStackTrace();
            }
            closeExistingPositions();
            BigDecimal totalPnl = cumulativePnl.add(unrealizedPnl);
            log.info("[Gate] 已实现:{}, 未实现:{}, 合计:{}",
                    cumulativePnl, unrealizedPnl, totalPnl);
            return;
        }
@@ -518,8 +528,8 @@
        }
        cumulativePnl = cumulativePnl.add(pnl);
        BigDecimal totalPnl = cumulativePnl.add(unrealizedPnl);
        log.info("[Gate] 盈亏累加:{}, 方向:{}, 已实现:{}, 未实现:{}, 合计:{}",
                pnl, side, cumulativePnl, unrealizedPnl, totalPnl);
        log.info("[Gate] 已实现:{}, 未实现:{}, 合计:{}",
                cumulativePnl, unrealizedPnl, totalPnl);
        if (totalPnl.compareTo(config.getOverallTp()) >= 0) {
            log.info("[Gate] 已达止盈目标(合计{})→已停止, 已实现:{}, 未实现:{}",