[bug fix]

This commit is contained in:
msincenselee 2020-03-25 20:58:55 +08:00
parent 4b33a59aa8
commit a7c0e3273b
2 changed files with 4 additions and 4 deletions

View File

@ -2548,7 +2548,7 @@ class CtaLineBar(object):
if hhv == llv:
rsv = 50
else:
rsv = (self.close_array - llv) / (hhv - llv) * 100
rsv = (self.close_array[-1] - llv) / (hhv - llv) * 100
self.line_rsv.append(rsv)
@ -2622,7 +2622,7 @@ class CtaLineBar(object):
# 发生金叉
self.cur_kd_count = 1
self.cur_kd_cross = round((self.line_k[-1] + self.line_k[-2]) / 2, 2)
self.cur_kd_cross_price = self.line_bar[-1].close
self.cur_kd_cross_price = self.cur_price
# K值小于D值
else:
@ -2633,7 +2633,7 @@ class CtaLineBar(object):
# 发生死叉
self.cur_kd_count = -1
self.cur_kd_cross = round((self.line_k[-1] + self.line_k[-2]) / 2, 2)
self.cur_kd_cross_price = self.line_bar[-1].close
self.cur_kd_cross_price = self.cur_price
def __count_macd(self):
"""

View File

@ -14,7 +14,7 @@ if not os.path.isdir(logs_path):
assert os.path.isdir(logs_path)
# 记录pid得文件
pid_file = os.path.abspath(os.path.join(logs_path, 'pid.txt'))
pid_file = os.path.abspath(os.path.join(logs_path, 'gpid.txt'))
def _check_pid(pid):
"""