This commit is contained in:
dsyoon
2023-05-29 20:27:33 +09:00
parent 1a243a6efb
commit 8294b9313e
2 changed files with 14 additions and 34 deletions

View File

@@ -444,13 +444,15 @@ class AnalyzerSqlite:
self.makeDir("monthly_env_상단_volume")
self.makeDir("monthly_mv_5_20")
self.makeDir("monthly_mv_20_60")
self.makeDir("monthly_BB하단_내려옴")
self.makeDir("weekly_env_상단_volume")
self.makeDir("weekly_mv_5_20")
self.makeDir("weekly_mv_20_60")
#self.makeDir("weekly_env_상단_volume")
#self.makeDir("weekly_mv_5_20")
#self.makeDir("weekly_mv_20_60")
self.makeDir("weekly_이격도")
self.makeDir("weekly_BB하단_내려옴")
self.makeDir("daily_env_상단_volume")
#self.makeDir("daily_env_상단_volume")
self.makeDir("daily_이전에_없던_거래량")
self.makeDir("daily_이격도")
self.makeDir("daily_OBV")
@@ -543,7 +545,7 @@ class AnalyzerSqlite:
# Weekly 체크
if len(stock_weekly['volume']) > 40:
"""
# ENV 상단 상향 돌파
check = self.common.check_env_upper_volume(stock_weekly)
if check:
@@ -567,7 +569,7 @@ class AnalyzerSqlite:
else:
log = ""
self.writeFile(dir_name, CODE, NAME, top, stock_weekly, log)
"""
# monthly_이격도
check = self.common.check_disparity(stock_weekly, 'weekly')
if check:
@@ -586,14 +588,14 @@ class AnalyzerSqlite:
# 2) daily
if len(stock_daily['volume']) > 100:
"""
# ENV 상단 상향 돌파
check = self.common.check_env_upper_volume(stock_daily)
if check:
dir_name = "Daily_env_상단_volume"
log = "RSI_" + "{:.2f}".format(stock_daily['rsi'][0])
self.writeFile(dir_name, CODE, NAME, top, stock_daily, log)
"""
# 52주 200일 기준 평균 + 50% 보다 높은 거래량의 경우
check, log = self.common.check_volume(stock_daily)
if check:

View File

@@ -556,33 +556,11 @@ class Common:
# 이격도 체크
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] < 100.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
if (89 < stock['disparity_avg5'][0] < 111.6 and 86.5 < stock['disparity_avg10'][0] < 108.5 and
102.5 < stock['disparity_avg20'][0] < 128.54 and 96 < stock['disparity_avg60'][0] < 123 and
77.5 < stock['disparity_avg120'][0] < 101):
return True
if (98 < stock['disparity_avg5'][0] < 101.2 and 100 < stock['disparity_avg10'][0] < 105 and
103.5 < stock['disparity_avg20'][0] < 108.1 and 98 < stock['disparity_avg60'][0] < 103 and
91 < stock['disparity_avg120'][0] < 96):
return True
if (101.5 < stock['disparity_avg5'][0] < 102.5 and 103.4 < stock['disparity_avg10'][0] < 104.2 and
106 < stock['disparity_avg20'][0] < 106.5 and 101 < stock['disparity_avg60'][0] < 101.5 and
100 < stock['disparity_avg120'][0] < 100.5):
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
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