From b70f32814aa9dc23ad284b43e91bbc6c96c70366 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Mon, 05 Jan 2026 15:32:08 +0800
Subject: [PATCH] feat(indicator): 添加MACD指标计算功能并优化策略参数

---
 src/main/java/com/xcong/excoin/modules/okxNewPrice/indicator/macdAndMatrategy/MacdMaStrategy.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/okxNewPrice/indicator/macdAndMatrategy/MacdMaStrategy.java b/src/main/java/com/xcong/excoin/modules/okxNewPrice/indicator/macdAndMatrategy/MacdMaStrategy.java
index 7a80222..7568e2b 100644
--- a/src/main/java/com/xcong/excoin/modules/okxNewPrice/indicator/macdAndMatrategy/MacdMaStrategy.java
+++ b/src/main/java/com/xcong/excoin/modules/okxNewPrice/indicator/macdAndMatrategy/MacdMaStrategy.java
@@ -384,7 +384,7 @@
         PriceData previous = macdData.get(macdData.size() - 2);
         
         // 金叉判断:DIF从下往上穿过DEA
-        return previous.getDif().compareTo(previous.getDea()) <= 0 && 
+        return previous.getDif().compareTo(previous.getDea()) < 0 && 
                latest.getDif().compareTo(latest.getDea()) > 0;
     }
     
@@ -406,7 +406,7 @@
         PriceData previous = macdData.get(macdData.size() - 2);
         
         // 死叉判断:DIF从上往下穿过DEA
-        return previous.getDif().compareTo(previous.getDea()) >= 0 && 
+        return previous.getDif().compareTo(previous.getDea()) > 0 && 
                latest.getDif().compareTo(latest.getDea()) < 0;
     }
     
@@ -454,4 +454,4 @@
                latest.getMacdHist().compareTo(BigDecimal.ZERO) < 0;
     }
 
-}
+}
\ No newline at end of file

--
Gitblit v1.9.1