Administrator
2025-12-29 b22f1797312ac54028f24c50ef9277f75c8ef9fc
refs
author Administrator <15274802129@163.com>
Monday, December 29, 2025 12:43 +0800
committer Administrator <15274802129@163.com>
Monday, December 29, 2025 12:43 +0800
commitb22f1797312ac54028f24c50ef9277f75c8ef9fc
tree adace25be475d33793a4c712998929ec8695697c tree | zip | gz
parent 2cb4335ce706ccb451ccc7edb92fd89b5ad427e2 view | diff
refactor(indicator): 重构MACD_MA策略的持仓状态和交易逻辑

- 修改PositionType枚举,将LONG/SHORT拆分为LONG_BUY/LONG_SELL/SHORT_SELL/SHORT_BUY
- 更新开仓逻辑,返回对应的持仓状态类型
- 添加平仓条件检查方法isLongExitCondition和isShortExitCondition
- 重构MACD金叉死叉判断逻辑,分离为独立的检测方法
- 修改交易指令生成逻辑,根据新的持仓状态返回正确的side和posSide组合
- 优化MACD柱状线正负值检查和扩张收缩逻辑
- 移除OrderInfoWs中的止损止盈处理逻辑
- 更新WebSocket客户端中的订单处理流程
1 files deleted
4 files modified
497 ■■■■■ changed files
src/main/java/com/xcong/excoin/modules/okxNewPrice/OkxKlineWebSocketClient.java 26 ●●●● diff | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxNewPrice/OkxQuantWebSocketClient.java 4 ●●● diff | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxNewPrice/indicator/macdAndMatrategy/MACD_MA_Strategy_Documentation 182 ●●●●● diff | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxNewPrice/indicator/macdAndMatrategy/MacdMaStrategy.java 277 ●●●● diff | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/okxNewPrice/okxWs/OrderInfoWs.java 8 ●●●● diff | view | raw | blame | history