分拆了index

This commit is contained in:
jackyu66git
2025-10-12 02:09:56 +08:00
parent eb6d4dae1e
commit eb3f394386
6 changed files with 289 additions and 1592 deletions
+2 -2
View File
@@ -84,12 +84,12 @@ class ChanLun():
def check_fx(self, klc):
if klc.pre and klc.next:
if klc.high > klc.pre.high and klc.high > klc.next.high:
if (klc.close > klc.ema52 or klc.next.close > klc.next.ema52) and klc.macd > 0:
if (klc.close > klc.ema52 or klc.next.close > klc.next.ema52) and klc.macd > 0 and klc.macd > klc.macdhist:
klc.set_fx(Chan_FX_TYPE.TOP)
#print(klc.start_time, klc.end_time,klc.next.start_time, klc.next.end_time, klc.macd, klc.state, klc.fx, "TOP")
return Chan_FX_TYPE.TOP
elif klc.low < klc.pre.low and klc.low < klc.next.low:
if (klc.close < klc.ema52 or klc.next.close < klc.next.ema52) and klc.macd < 0:
if (klc.close < klc.ema52 or klc.next.close < klc.next.ema52) and klc.macd < 0 and klc.macd < klc.macdhist:
klc.set_fx(Chan_FX_TYPE.BOTTOM)
#print(klc.start_time, klc.end_time,klc.next.start_time, klc.next.end_time, klc.macd, klc.state, klc.fx, "BOTTOM")
return Chan_FX_TYPE.BOTTOM