From 6720d44ba58f513263dd603f33d6a65181649a7c Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Sun, 04 Jan 2026 12:58:30 +0800
Subject: [PATCH] feat(indicator): 添加MACD背离检测功能并优化策略判断逻辑
---
src/main/java/com/xcong/excoin/modules/newPrice/OkxNewPriceWebSocketClient.java | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/modules/newPrice/OkxNewPriceWebSocketClient.java b/src/main/java/com/xcong/excoin/modules/newPrice/OkxNewPriceWebSocketClient.java
index f279e89..27b97d9 100644
--- a/src/main/java/com/xcong/excoin/modules/newPrice/OkxNewPriceWebSocketClient.java
+++ b/src/main/java/com/xcong/excoin/modules/newPrice/OkxNewPriceWebSocketClient.java
@@ -30,7 +30,7 @@
*/
@Slf4j
@Component
-@ConditionalOnProperty(prefix = "app", name = "quant", havingValue = "true")
+@ConditionalOnProperty(prefix = "app", name = "websocket", havingValue = "true")
public class OkxNewPriceWebSocketClient {
@Resource
private WebsocketPriceService websocketPriceService;
@@ -81,9 +81,9 @@
}
sharedExecutor.shutdownNow();
}
- private static final String WS_URL_MONIPAN = "wss://wspap.okx.com:8443/ws/v5/private";
- private static final String WS_URL_SHIPAN = "wss://ws.okx.com:8443/ws/v5/private";
- private static final boolean isAccountType = true;
+ private static final String WS_URL_MONIPAN = "wss://wspap.okx.com:8443/ws/v5/public";
+ private static final String WS_URL_SHIPAN = "wss://ws.okx.com:8443/ws/v5/public";
+ private static final boolean isAccountType = false;
/**
* 建立与 OKX WebSocket 服务器的连接。
@@ -301,7 +301,7 @@
*/
private void reconnectWithBackoff() throws InterruptedException {
int attempt = 0;
- int maxAttempts = 5;
+ int maxAttempts = 3;
long delayMs = 5000;
while (attempt < maxAttempts) {
--
Gitblit v1.9.1