From 5bda3635131c0fd6fc8af5ca9d7f4392f803a056 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Thu, 06 Aug 2026 16:00:53 +0800
Subject: [PATCH] fix(gate): 修复网格交易止损计数和同网格重复触发问题
---
src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java b/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
index 5ce118d..5e271ec 100644
--- a/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
+++ b/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
@@ -676,7 +676,7 @@
log.info("[Gate] 空单成交 gridId:{}, 当前持仓:{}张", filledQty, posSize);
-
+ accumulatedShortLossCount++;
checkShortStopLongProfit(accumulatedShortLossCount, shortGridElement.getId() + 2);
}
@@ -708,7 +708,7 @@
// placeExcessTakeProfit(posSize, true);
log.info("[Gate] 多单成交 gridId:{}, 当前持仓:{}张", filledQty, posSize);
-
+ accumulatedLongLossCount++;
checkLongStopShortProfit(accumulatedLongLossCount, longGridElement.getId() -2);
}
@@ -1287,7 +1287,6 @@
}
lastLongStopLossGridId = gridId;
- accumulatedLongLossCount++;
log.info("[Gate] 多仓止损触发 gridId:{}, 止损次数:{}{}, 开始追单",
gridId, accumulatedLongLossCount, sameGrid ? "(同网格)" : "");
int newEntryGridId = gridId + 1;
@@ -1497,7 +1496,6 @@
return;
}
lastShortStopLossGridId = gridId;
- accumulatedShortLossCount++;
log.info("[Gate] 空仓止损触发 gridId:{}, 止损次数:{}{}, 开始追单",
gridId, accumulatedShortLossCount, sameGrid ? "(同网格)" : "");
int newEntryGridId = gridId - 1;
--
Gitblit v1.9.1