complete histset recognition
This commit is contained in:
@@ -102,11 +102,9 @@ class ChanMACD():
|
||||
else:
|
||||
last_unittf.add_klu(klu)
|
||||
last_seg.add_klu(klu)
|
||||
last_histset.add_klu(klu)
|
||||
else:
|
||||
last_unittf.add_klu(klu)
|
||||
last_seg.add_klu(klu)
|
||||
last_histset.add_klu(klu)
|
||||
# 3) 直方图集合(基于当前 unittf)
|
||||
if klu.macdhist >= 0:
|
||||
if last_histset and last_histset.histset_dir == Chan_MACDHISTSET_DIR.ABOVE:
|
||||
|
||||
+8
-1
@@ -44,9 +44,16 @@ class ChanMACDHistSet():
|
||||
self.klu_list.append(klu)
|
||||
self.area += klu.macdhist
|
||||
def set_end_klu(self, end_klu):
|
||||
self.add_klu(end_klu)
|
||||
self.end_klu = end_klu
|
||||
self.end_time = end_klu.time
|
||||
"""
|
||||
if self.div_klu:
|
||||
print(self.start_time, self.peak_klu.time, self.div_klu.time, self.klu_list[-1].time, len(self.klu_list), self.histset_dir)
|
||||
elif self.peak_klu:
|
||||
print(self.start_time, "Peak:", self.peak_klu.time, self.klu_list[-1].time, len(self.klu_list), self.histset_dir)
|
||||
else:
|
||||
print(self.start_time, "None", self.klu_list[-1].time, len(self.klu_list), self.histset_dir)
|
||||
"""
|
||||
def find_peak_from(self, from_klu):
|
||||
peak_klu = None
|
||||
if from_klu in self.klu_list:
|
||||
|
||||
+5
-1
@@ -38,4 +38,8 @@ class ChanMACDUnitTF():
|
||||
self.add_klu(end_klu)
|
||||
self.end_type = end_type
|
||||
self.end_klu = end_klu
|
||||
self.end_time = end_klu.time
|
||||
self.end_time = end_klu.time
|
||||
if self.peak_klu:
|
||||
print(self.start_klu.time, self.peak_klu.time)
|
||||
else:
|
||||
print("None", len(self.histset_list))
|
||||
Reference in New Issue
Block a user