添加笔中枢,删除了很多没有用的方法

This commit is contained in:
jackyu66git
2025-10-24 23:31:43 +08:00
parent cb621c3d87
commit dce2099ba1
9 changed files with 519 additions and 1266 deletions
+6
View File
@@ -36,6 +36,8 @@ class ChanKLU:
self.body_ratio = self.body / self.range
self.upper_shadow_ratio = self.upper_shadow / self.body
self.lower_shadow_ratio = self.lower_shadow / self.body
self.exception = False
self.cal_exception()
self.candle_dir = Chan_K_DIR.CROSS if self.close == self.open else Chan_K_DIR.BULL if self.close > self.open else Chan_K_DIR.BEAR
self.continue_div = 0
@@ -65,6 +67,10 @@ class ChanKLU:
#print(self.open, self.close, self.high, self.low, self.candle_dir, self.strength)
def set_macd_state(self, state):
self.macd_state = state
def cal_exception(self):
if self.upper_shadow_ratio > 5 or self.lower_shadow_ratio > 5:
self.exception = True
#print(self.time, self.upper_shadow_ratio, self.lower_shadow_ratio, self.body, self.lower_shadow, self.upper_shadow, self.high, self.low, self.close, self.open)
def set_trend(self, trend):
self.trend = trend
def set_next(self, next):