添加分型识别
This commit is contained in:
@@ -919,11 +919,11 @@ class TF_DF():
|
||||
bi_klc_min = 4
|
||||
for klc in klc_list:
|
||||
fx = self.check_fx(klc)
|
||||
if fx == Chan_FX_TYPE.TOP:
|
||||
if fx == Chan_FX_TYPE.TOP and False:
|
||||
if last_bottom:
|
||||
if self.check_top_fx(last_bottom, klc) == False:
|
||||
fx = Chan_FX_TYPE.UNKNOWN
|
||||
if fx == Chan_FX_TYPE.BOTTOM:
|
||||
if fx == Chan_FX_TYPE.BOTTOM and False:
|
||||
if last_top:
|
||||
if self.check_bottom_fx(last_top, klc) == False:
|
||||
#print(klc.end_time, last_top.end_time, "---")
|
||||
@@ -986,7 +986,7 @@ class TF_DF():
|
||||
if last_top.high > klc.high:
|
||||
bi_list[-1].add_klc(klc)
|
||||
klc.set_bi(bi_list[-1])
|
||||
#klc.set_klc_fx_type(Chan_KLC_FX.TOP3)
|
||||
klc.set_klc_fx_type(Chan_KLC_FX.TOP3)
|
||||
#print(klc.end_time, klc.fx, "二类卖点Sell 1")
|
||||
else:
|
||||
# A new top found
|
||||
@@ -1000,11 +1000,12 @@ class TF_DF():
|
||||
klc.set_bi(bi_list[-1])
|
||||
# 不满足结合律的分型
|
||||
else:
|
||||
klc.set_klc_fx_type(Chan_KLC_FX.TOP0)
|
||||
#klc.set_klc_fx_type(Chan_KLC_FX.TOP0)
|
||||
print(klc.end_time, klc.klc_fx_type)
|
||||
if last_bottom.index + bi_klc_min > klc.index:
|
||||
if last_top.high > klc.high:
|
||||
#print(klc.start_time, klc.fx, "二类卖点Sell 1")
|
||||
#klc.set_fx(Chan_FX_TYPE.PTOP)
|
||||
klc.set_klc_fx_type(Chan_KLC_FX.TOP8)
|
||||
bi_list[-1].add_klc(klc)
|
||||
klc.set_bi(bi_list[-1])
|
||||
# New TOP Found前面的UKNOWN可能出现TOP7,但是这里的也可能出现TOP8分型
|
||||
@@ -1103,7 +1104,7 @@ class TF_DF():
|
||||
if last_bottom.low < klc.low:
|
||||
bi_list[-1].add_klc(klc)
|
||||
klc.set_bi(bi_list[-1])
|
||||
#klc.set_klc_fx_type(Chan_KLC_FX.BOTTOM3)
|
||||
klc.set_klc_fx_type(Chan_KLC_FX.BOTTOM3)
|
||||
#print(last_bottom.start_time, last_bottom.end_time, "--------------------------------1")
|
||||
#print(klc.end_time, klc.fx, "二类买点Buy 1")
|
||||
else:
|
||||
@@ -1117,12 +1118,14 @@ class TF_DF():
|
||||
klc.set_bi(bi_list[-1])
|
||||
# 不满足结合律的分型
|
||||
else:
|
||||
klc.set_klc_fx_type(Chan_KLC_FX.TOP0)
|
||||
#klc.set_klc_fx_type(Chan_KLC_FX.BOTTOM0)
|
||||
#print(klc.end_time, klc.klc_fx_type)
|
||||
if last_top.index + bi_klc_min > klc.index:
|
||||
if last_bottom.low < klc.low:
|
||||
#print(klc.end_time, klc.fx, "中枢买点Buy 1")
|
||||
bi_list[-1].add_klc(klc)
|
||||
klc.set_bi(bi_list[-1])
|
||||
klc.set_klc_fx_type(Chan_KLC_FX.BOTTOM8)
|
||||
# Found new bottom没有意义,上面UNKNOWN的时候已经是笔破坏了
|
||||
else:
|
||||
#print(klc.end_time, last_bottom.end_time, "Found a new bottom")
|
||||
@@ -1155,7 +1158,6 @@ class TF_DF():
|
||||
if not last_bi.is_sure:
|
||||
last_bi.set_end_klc(last_top, klc)
|
||||
bi = ChanBI(last_top, len(bi_list), Chan_BI_DIR.DOWN)
|
||||
#klc.set_klc_fx_type(Chan_KLC_FX.TOP6)
|
||||
last_bi.set_next(bi)
|
||||
bi.set_pre(last_bi)
|
||||
bi.add_klc(klc)
|
||||
|
||||
Reference in New Issue
Block a user