This commit is contained in:
dsyoon
2023-05-21 10:41:36 +09:00
parent 17d9b4df70
commit 1219edc7c7
2 changed files with 18 additions and 15 deletions

View File

@@ -555,11 +555,22 @@ class Common:
return False, ""
# 이격도 체크
def check_disparity(self, stock):
if (99 < stock['disparity_avg5'][0] < 101 and 98.7 < stock['disparity_avg10'][0] < 101.3 and
98.5 < stock['disparity_avg20'][0] < 101.5 and 98.3 < stock['disparity_avg60'][0] < 101.7 and
98 < stock['disparity_avg120'][0] < 102):
return True
def check_disparity(self, stock, type="daily"):
if type == "weekly":
if (90 < stock['disparity_avg5'][0] < 97 and 89 < stock['disparity_avg10'][0] < 93.5 and
99 < stock['disparity_avg20'][0] < 102 and 101 < stock['disparity_avg60'][0] < 106 and
100 < stock['disparity_avg120'][0] < 104.5):
return True
if (98 < stock['disparity_avg5'][0] < 10.5 and 98 < stock['disparity_avg10'][0] < 100 and
102 < stock['disparity_avg20'][0] < 104 and 99 < stock['disparity_avg60'][0] < 102 and
97 < stock['disparity_avg120'][0] < 99):
return True
else:
if (99 < stock['disparity_avg5'][0] < 101 and 98.7 < stock['disparity_avg10'][0] < 101.3 and
98.5 < stock['disparity_avg20'][0] < 101.5 and 98.3 < stock['disparity_avg60'][0] < 101.7 and
98 < stock['disparity_avg120'][0] < 102):
return True
return False
# 낙폭 과대 체크