中枢终于画对了,可以交易了

This commit is contained in:
jackyu66git
2026-03-11 11:33:21 +08:00
parent 5226c551d5
commit ea47bfe9b7
2 changed files with 76 additions and 30 deletions
+20 -1
View File
@@ -69,4 +69,23 @@ class ChanZS():
def set_gg(self, gg):
self.gg = gg
def set_dd(self, dd):
self.dd = dd
self.dd = dd
# 大级别中枢:由多个区间重叠(扩张)的笔/线段中枢合并而成,用于显示更大级别的震荡区间
class ChanZS_Big():
def __init__(self, zs_list):
assert len(zs_list) >= 1
self.zs_list = list(zs_list)
first = self.zs_list[0]
last = self.zs_list[-1]
self.start_time = first.start_time
self.end_time = last.end_time if last.end_time else None
self.start_klc = first.start_klc
self.end_klc = last.end_klc
# 大级别区间取并集:包住所有子中枢
self.zd = min(zs.zd for zs in self.zs_list)
self.zg = max(zs.zg for zs in self.zs_list)
self.dd = min(zs.dd for zs in self.zs_list)
self.gg = max(zs.gg for zs in self.zs_list)
self.index = 0 # 由外部设置