添加未完成笔和线段
This commit is contained in:
+10
-3
@@ -73,8 +73,7 @@ class ChanLun():
|
||||
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
|
||||
if klc.pre and klc.next:
|
||||
if klc.low < klc.pre.low and klc.low < klc.next.low:
|
||||
elif klc.low < klc.pre.low and klc.low < klc.next.low:
|
||||
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
|
||||
@@ -778,7 +777,7 @@ class ChanLun():
|
||||
|
||||
# Do nothing
|
||||
if fx == Chan_FX_TYPE.UNKNOWN:
|
||||
if len(bi_list) > 0:
|
||||
if len(bi_list) > 0 and klc.end_klu:
|
||||
last_bi = bi_list[-1]
|
||||
#print(klc.start_time, last_bi.start_time, last_bi.end_time, last_bi.dir, last_bi.high, last_bi.low, last_bottom.end_time, "last bi")
|
||||
if last_top and last_bi.dir == Chan_BI_DIR.DOWN:
|
||||
@@ -1082,6 +1081,8 @@ class ChanLun():
|
||||
if seg.next.next.is_sure:
|
||||
zg = min(seg.high, seg.next.high, seg.next.next.high)
|
||||
zd = max(seg.low, seg.next.low, seg.next.next.low)
|
||||
gg = max(seg.high, seg.next.high, seg.next.next.high)
|
||||
dd = min(seg.low, seg.next.low, seg.next.next.low)
|
||||
ddir = Chan_ZS_DIR.UP
|
||||
ddir = None
|
||||
if last_zs:
|
||||
@@ -1104,6 +1105,8 @@ class ChanLun():
|
||||
zs = ChanZS(seg, len(zs_list), ddir)
|
||||
zs.set_zg(zg)
|
||||
zs.set_zd(zd)
|
||||
zs.set_gg(gg)
|
||||
zs.set_dd(dd)
|
||||
if last_zs:
|
||||
last_zs.set_next(zs)
|
||||
zs.set_pre(last_zs)
|
||||
@@ -1130,6 +1133,8 @@ class ChanLun():
|
||||
if seg.next.next.is_sure:
|
||||
zg = min(seg.high, seg.next.high, seg.next.next.high)
|
||||
zd = max(seg.low, seg.next.low, seg.next.next.low)
|
||||
gg = max(seg.high, seg.next.high, seg.next.next.high)
|
||||
dd = min(seg.low, seg.next.low, seg.next.next.low)
|
||||
ddir = None
|
||||
if last_zs:
|
||||
if zg < last_zs.zd:
|
||||
@@ -1151,6 +1156,8 @@ class ChanLun():
|
||||
zs = ChanZS(seg, len(zs_list), ddir)
|
||||
zs.set_zg(zg)
|
||||
zs.set_zd(zd)
|
||||
zs.set_gg(gg)
|
||||
zs.set_dd(dd)
|
||||
last_zs.set_next(zs)
|
||||
zs.set_pre(last_zs)
|
||||
zs_list.append(zs)
|
||||
|
||||
Reference in New Issue
Block a user