This commit is contained in:
dsyoon
2023-05-05 16:57:36 +09:00
parent c2183637ae
commit 9fe26cb803
2 changed files with 22 additions and 2 deletions

View File

@@ -410,8 +410,10 @@ class AnalyzerSqlite:
self.makeDir("monthly_env_하단_rsi_50")
self.makeDir("monthly_env_상단")
self.makeDir("monthly_mv_20_60")
self.makeDir("weekly_mv_5_20")
self.makeDir("weekly_mv_20_60")
self.makeDir("daily_이전에_없던_거래량")
self.makeDir("daily_이격도")
@@ -477,16 +479,30 @@ class AnalyzerSqlite:
log = "RSI_" + "{:.2f}".format(stock_monthly['rsi'][0])
self.writeFile(dir_name, CODE, NAME, top, stock_monthly, log)
# 20개월 60개월 선
check = self.common.check_mv_20_60(stock_monthly)
if check:
dir_name = "monthly_mv_20_60"
log = "RSI_" + "{:.2f}".format(stock_monthly['rsi'][0])
self.writeFile(dir_name, CODE, NAME, top, stock_monthly, log)
# Weekly 체크
if len(stock_weekly['volume']) > 40:
# 5주
check = self.common.check_week_5_20(stock_weekly)
check = self.common.check_mv_5_20(stock_weekly)
if check:
dir_name = "weekly_mv_5_20"
log = "RSI_"+"{:.2f}".format(stock_weekly['rsi'][0])
self.writeFile(dir_name, CODE, NAME, top, stock_weekly, log)
# 20주 60주 선
check = self.common.check_mv_20_60(stock_weekly)
if check:
dir_name = "weekly_mv_20_60"
log = "RSI_" + "{:.2f}".format(stock_monthly['rsi'][0])
self.writeFile(dir_name, CODE, NAME, top, stock_monthly, log)
# 2) daily
if len(stock_daily['volume']) > 100:

View File

@@ -506,11 +506,15 @@ class Common:
return True
return False
def check_week_5_20(self, stock):
def check_mv_5_20(self, stock):
if stock['avg5'][1] < stock['avg20'][1] and stock['avg20'][0] < stock['avg5'][0]:
return True
return False
def check_mv_20_60(self, stock):
if stock['avg20'][1] < stock['avg60'][1] and stock['avg60'][0] < stock['avg20'][0]:
return True
return False
# 거래량 체크
# 52주 200일 기준 평균 + 50% 보다 높은 거래량의 경우