修改使用未来数据

This commit is contained in:
jackyu66git
2025-09-11 18:39:57 +08:00
parent e75aca320e
commit 4ea4b8cac5
6 changed files with 117 additions and 51 deletions
+2 -2
View File
@@ -653,10 +653,10 @@ class ChanKLU:
return self.macd_state
if self.macd > 0:
if self.macd < self.signal and self.close > self.ema52 and self.low < self.ema52:
self.near0_return = 6
self.near0_return = 0
else:
if self.macd > self.signal and self.close < self.ema52 and self.high > self.ema52:
self.near0_return = 7
self.near0_return = 0
# CROSS0 仅以 Signal 穿越零轴判定
if self.pre.signal >= 0 and self.signal < 0:
self.macd_state = Chan_MACD_STATE.CROSS0_DOWN