diff --git a/.DS_Store b/.DS_Store
index 29e0c04..1cf9306 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/ChanKLC.py b/ChanKLC.py
index d728911..8999da6 100644
--- a/ChanKLC.py
+++ b/ChanKLC.py
@@ -60,7 +60,7 @@ class ChanKLC():
def set_klc_fx_type(self, klc_fx_type):
#print(self.start_time, klc_fx_type, self.get_feature_data()['klu_macd'], self.get_feature_data()['klu_macdhist'], self.get_feature_data()['klu_rsi'])
self.klc_fx_type = klc_fx_type
- #self.cal_invisible()
+ #self.cal_fx()
self.cal_bb_out()
def add_klu(self, klu):
self.klus.append(klu)
@@ -76,12 +76,9 @@ class ChanKLC():
if klu.macd_state != Chan_MACD_STATE.UNKNOWN:
self.state = klu.macd_state
self.cal_indicators()
- def cal_invisible(self):
+ def cal_fx(self):
if self.klc_fx_type == Chan_KLC_FX.TOP1 or self.klc_fx_type == Chan_KLC_FX.TOP2:
#print(self.end_time, self.fx, self.macd, self.macdhist, len(self.klus))
- if self.macdhist < 0 and self.macd > 0:
- self.klc_fx_type = Chan_KLC_FX.TOP5
- return
if self.state == Chan_MACD_STATE.HIGH_EMPTY and self.macd > 0:
#print(self.end_time, self.state, self.macd, self.klc_fx_type)
self.klc_fx_type = Chan_KLC_FX.TOP6
@@ -191,6 +188,14 @@ class ChanKLC():
return False
def set_fx(self, fx: Chan_FX_TYPE):
self.fx = fx
+ def cal_invisible(self):
+ if self.fx == Chan_FX_TYPE.TOP:
+ if self.macdhist < 0 and self.macd > 0:
+ self.klc_fx_type = Chan_KLC_FX.TOP5
+ else:
+ if self.fx == Chan_FX_TYPE.BOTTOM:
+ if self.macdhist > 0 and self.macd < 0:
+ self.klc_fx_type = Chan_KLC_FX.BOTTOM5
def set_pre_fx(self):
if self.pre and self.pre.pre:
self.pre.fx = self.check_fx(self.pre.pre, self.pre)
diff --git a/ChanLun.py b/ChanLun.py
index f10476f..cab0039 100644
--- a/ChanLun.py
+++ b/ChanLun.py
@@ -576,6 +576,8 @@ class ChanLun():
except Exception:
trend = Chan_PRICE_TREND.UNKNOWN
# 写回趋势
+ if klc.end_time is None:
+ trend = Chan_PRICE_TREND.FLAT
if hasattr(klc, 'set_trend'):
klc.set_trend(trend)
else:
@@ -640,6 +642,7 @@ class ChanLun():
#klc.set_state("20")
bi_list[-1].add_klc(klc)
klc.set_bi(bi_list[-1])
+ #klc.cal_invisible()
#klc.set_klc_fx_type(Chan_KLC_FX.TOP3)
#print(klc.start_time, klc.fx, "二类卖点Sell 1")
else:
@@ -764,6 +767,7 @@ class ChanLun():
#klc.set_state("-20")
bi_list[-1].add_klc(klc)
klc.set_bi(bi_list[-1])
+ #klc.cal_invisible()
#klc.set_klc_fx_type(Chan_KLC_FX.BOTTOM3)
#print(last_bottom.start_time, last_bottom.end_time, "--------------------------------1")
#print(klc.start_time, klc.fx, "二类买点Buy 1")
diff --git a/TF_DF.py b/TF_DF.py
index f335c63..cd466f4 100644
--- a/TF_DF.py
+++ b/TF_DF.py
@@ -127,12 +127,12 @@ class TF_DF():
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.macd > 0 and klc.macd > klc.signal and klc.signal > klc.macdhist:
+ if klc.macd > 0 and klc.signal > 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.fx, "TOP")
return Chan_FX_TYPE.TOP
elif klc.low < klc.pre.low and klc.low < klc.next.low:
- if klc.macd < 0 and klc.macd < klc.signal and klc.signal < klc.macdhist:
+ if klc.macd < 0 and klc.signal < 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.fx, "BOTTOM")
return Chan_FX_TYPE.BOTTOM
diff --git a/web/templates/index.html b/web/templates/index.html
index 528aade..cc330f2 100644
--- a/web/templates/index.html
+++ b/web/templates/index.html
@@ -1341,9 +1341,54 @@