添加波浪理论和klc状态识别
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from datetime import timedelta
|
||||
from pandas import DataFrame
|
||||
from ChanEnum import Chan_FX_TYPE, Chan_KLINE_DIR, Chan_BI_DIR, Chan_SEG_DIR, Chan_ZS_DIR, Chan_BSP_DIR, Chan_BSP_TYPE, Chan_KLC_FX, Chan_PRICE_TREND, Chan_KLU_PATTERN, Chan_K_DIR
|
||||
from ChanEnum import Chan_FX_TYPE, Chan_KLINE_DIR, Chan_BI_DIR, Chan_SEG_DIR, Chan_ZS_DIR, Chan_BSP_DIR, Chan_BSP_TYPE, Chan_KLC_FX, Chan_PRICE_TREND, Chan_KLU_PATTERN, Chan_K_DIR, Chan_KLC_STATE
|
||||
from ChanKLU import ChanKLU
|
||||
from ChanKLC import ChanKLC
|
||||
from ChanBI import ChanBI
|
||||
@@ -918,8 +918,11 @@ class TF_DF():
|
||||
bi_list = []
|
||||
last_top = None
|
||||
last_bottom = None
|
||||
bi_klc_min = 4
|
||||
bi_klc_min = 3
|
||||
last_fx_klc = None
|
||||
for klc in klc_list:
|
||||
if last_fx_klc and klc.index > len(klc_list) - 5:
|
||||
klc.check_klc_state(last_fx_klc)
|
||||
klc.check_fx_confirmed(last_top, last_bottom)
|
||||
fx = self.check_fx(klc)
|
||||
if fx == Chan_FX_TYPE.TOP and False:
|
||||
@@ -979,6 +982,7 @@ class TF_DF():
|
||||
#print(klc.start_time, bi.start_time, bi.end_time, bi.dir, bi.high, bi.low, bi.is_sure)
|
||||
"""
|
||||
else:
|
||||
last_fx_klc = klc
|
||||
if fx == Chan_FX_TYPE.TOP:
|
||||
#print(klc.end_time, fx, klc.pre.high, klc.high, klc.pre.start_time, klc.pre.end_time)
|
||||
if last_top:
|
||||
@@ -1069,7 +1073,7 @@ class TF_DF():
|
||||
klc.set_bi(bi_list[-1])
|
||||
# 初始化的时候用,其他时间不用
|
||||
else:
|
||||
klc.set_fx(Chan_FX_TYPE.TT)
|
||||
#klc.set_fx(Chan_FX_TYPE.TT)
|
||||
#print(klc.start_time, klc.fx, "二类卖点Sell 2")
|
||||
bi_list[-1].add_klc(klc)
|
||||
klc.set_bi(bi_list[-1])
|
||||
@@ -1184,7 +1188,7 @@ class TF_DF():
|
||||
klc.set_bi(bi_list[-1])
|
||||
#print(klc.start_time, klc.fx, "笔买点Buy 3")
|
||||
else:
|
||||
klc.set_fx(Chan_FX_TYPE.BB)
|
||||
#klc.set_fx(Chan_FX_TYPE.BB)
|
||||
#klc.set_state('-20')
|
||||
#print(klc.start_time, klc.fx, "二类买点Buy 2")
|
||||
bi_list[-1].add_klc(klc)
|
||||
|
||||
Reference in New Issue
Block a user