From 9bd318567e2ba1350b47a42dc9b292a1eb0b9757 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Mon, 18 May 2026 21:14:18 +0800
Subject: [PATCH] 第二个版本
---
src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java | 4 +++-
1 files changed, 3 insertions(+), 1 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 4705633..86e4763 100644
--- a/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
+++ b/src/main/java/com/xcong/excoin/modules/gateApi/GateGridTradeService.java
@@ -1008,7 +1008,7 @@
if (downGridElement != null){
TraderParam downLongTraderParam = downGridElement.getLongTraderParam();
- if (!downGridElement.isHasShortOrder()){
+ if (!downGridElement.isHasLongOrder()){
executor.placeConditionalEntryOrder(
downLongTraderParam.getEntryPrice(),
FuturesPriceTrigger.RuleEnum.NUMBER_1,
@@ -1029,6 +1029,7 @@
BigDecimal downGridPrice = downGridElement.getGridPrice();
if (
!downGridElement.isHasShortOrder() &&
+ downGridPrice.compareTo(currentPrice) < 0 &&
downGridPrice.compareTo(longEntryPrice) <= 0 &&
downGridPrice.compareTo(shortEntryPrice) >= 0
){
@@ -1190,6 +1191,7 @@
BigDecimal downGridPrice = downGridElement.getGridPrice();
if (
!downGridElement.isHasLongOrder() &&
+ downGridPrice.compareTo(currentPrice) > 0 &&
downGridPrice.compareTo(longEntryPrice) <= 0 &&
downGridPrice.compareTo(shortEntryPrice) >= 0
){
--
Gitblit v1.9.1