添加笔中枢,删除了很多没有用的方法
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user