提交 d152c273 编写于 作者: Z zengbin93

0.5.5 fix bi error

上级 fa4b9193
......@@ -125,7 +125,7 @@ def find_zs(points):
def has_gap(k1, k2, min_gap=0.002):
"""判断 k1, k2 之间是否有缺口"""
assert k2['dt'] > k1['dt']
# assert k2['dt'] > k1['dt']
if k1['high'] < k2['low'] * (1-min_gap) \
or k2['high'] < k1['low'] * (1-min_gap):
return True
......@@ -385,9 +385,10 @@ class KlineAnalyze:
def _update_kline_new(self):
"""更新去除包含关系的K线序列"""
if len(self.kline_new) == 0:
if len(self.kline_new) < 4:
for x in self.kline_raw[:4]:
self.kline_new.append(dict(x))
return
# 新K线只会对最后一个去除包含关系K线的结果产生影响
self.kline_new = self.kline_new[:-2]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册