添加ema26和ema52交叉策略,今年可以,还需要再看看细节
This commit is contained in:
+9
-5
@@ -111,10 +111,10 @@ class ChanKLU:
|
||||
def check_bb2633(self, threadhold=300):
|
||||
#print(self.time, self.high, self.bb2633upper, self.low, self.bb2633lower)
|
||||
if abs(self.high - self.bb2633upper) < threadhold:
|
||||
print(self.time, self.high, self.bb2633upper)
|
||||
#print(self.time, self.high, self.bb2633upper)
|
||||
return 1
|
||||
if abs(self.low - self.bb2633lower) < threadhold:
|
||||
print(self.time, self.low, self.bb2633lower)
|
||||
#print(self.time, self.low, self.bb2633lower)
|
||||
return -1
|
||||
return 0
|
||||
def check_fx_dir(self, pre, next):
|
||||
@@ -202,13 +202,15 @@ class ChanKLU:
|
||||
if 0 < self.low - self.ema52 < 100:
|
||||
self.near0_return = 0
|
||||
elif self.close > self.ema52 and self.low < self.ema52 and self.open > self.ema52:
|
||||
self.near0_return = 7
|
||||
self.near0_return = 0
|
||||
elif self.close < self.ema52 and self.open > self.ema52 and self.high > self.ema52 and self.low < self.ema52:
|
||||
self.near0_return = 0
|
||||
elif self.close < self.ema52 and self.open < self.ema52 and self.high > self.ema52 and self.low < self.ema52:
|
||||
self.near0_return = 0
|
||||
elif self.close > self.ema52 and self.open > self.ema52 and self.high > self.ema52 and self.low < self.ema52:
|
||||
self.near0_return = 0
|
||||
elif self.close > self.ema52 and self.high > self.ema52 and self.low < self.ema52:
|
||||
self.near0_return = 0
|
||||
else:
|
||||
if self.macd > self.signal:
|
||||
if 0 < self.ema52 - self.high < 100:
|
||||
@@ -216,10 +218,12 @@ class ChanKLU:
|
||||
elif self.close < self.ema52 and self.high > self.ema52 and self.open < self.ema52:
|
||||
self.near0_return = 0
|
||||
elif self.close < self.ema52 and self.open > self.ema52 and self.high > self.ema52 and self.low < self.ema52:
|
||||
self.near0_return = 81
|
||||
self.near0_return = 0
|
||||
elif self.close > self.ema52 and self.open < self.ema52 and self.high > self.ema52 and self.low < self.ema52:
|
||||
self.near0_return = 0
|
||||
elif self.close > self.ema52 and self.high > self.ema52 and self.open > self.ema52 and self.low < self.ema52:
|
||||
elif self.close > self.ema52 and self.high > self.ema52 and self.open >= self.ema52 and self.low < self.ema52:
|
||||
self.near0_return = 0
|
||||
elif self.close > self.ema52 and self.high > self.ema52 and self.low < self.ema52:
|
||||
self.near0_return = 0
|
||||
# CROSS0 仅以 Signal 穿越零轴判定
|
||||
if self.pre.signal >= 0 and self.signal < 0:
|
||||
|
||||
Reference in New Issue
Block a user