This commit is contained in:
dsyoon
2023-01-23 18:06:05 +09:00
parent fabff58044
commit bed9210511

View File

@@ -473,7 +473,7 @@ class AnalyzerSqlite:
# RSI가 20 이하인 경우, rsi가 rsis위로 올라온 경우 # RSI가 20 이하인 경우, rsi가 rsis위로 올라온 경우
if len(stock_monthly['close']) > 1: if len(stock_monthly['close']) > 1:
if stock_monthly['rsi'][0] is not None: if stock_monthly['rsi'][0] is not None and stock_monthly['rsi'][1] is not None:
if stock_monthly['rsi'][0] <= 20: if stock_monthly['rsi'][0] <= 20:
if stock_monthly['rsi'][1] < stock_monthly['rsis'][1] and stock_monthly['rsis'][0] < stock_monthly['rsi'][0]: if stock_monthly['rsi'][1] < stock_monthly['rsis'][1] and stock_monthly['rsis'][0] < stock_monthly['rsi'][0]:
dir_code = "2" dir_code = "2"
@@ -483,6 +483,7 @@ class AnalyzerSqlite:
self.writeFile(dir_code, dir_name, CODE, NAME, top, stock_monthly, status) self.writeFile(dir_code, dir_name, CODE, NAME, top, stock_monthly, status)
if len(stock_monthly['volume']) > 5: if len(stock_monthly['volume']) > 5:
if stock_monthly['envelope_lower'][0] is not None and stock_monthly['envelope_lower'][1] is not None:
# env 하단에 부딪힘 # env 하단에 부딪힘
if stock_monthly['close'][1] < stock_monthly['envelope_lower'][1] and stock_monthly['envelope_lower'][0] < stock_monthly['close'][0]: if stock_monthly['close'][1] < stock_monthly['envelope_lower'][1] and stock_monthly['envelope_lower'][0] < stock_monthly['close'][0]:
dir_code = "3" dir_code = "3"
@@ -495,7 +496,7 @@ class AnalyzerSqlite:
# 2) daily # 2) daily
if len(stock_daily['volume']) > 5: if len(stock_daily['volume']) > 5:
# MSCD -500 이하인 경우 # MSCD -500 이하인 경우
if stock_daily['macd'][0] is not None: if stock_daily['macd'][1] is not None and stock_daily['macds'][1] is not None:
if stock_daily['macd'][0] <= -1000: if stock_daily['macd'][0] <= -1000:
if stock_daily['macd'][1] < stock_daily['macds'][1] and stock_daily['macds'][0] < stock_daily['macds'][0]: if stock_daily['macd'][1] < stock_daily['macds'][1] and stock_daily['macds'][0] < stock_daily['macds'][0]:
dir_code = "11" dir_code = "11"
@@ -549,6 +550,7 @@ class AnalyzerSqlite:
self.writeFile(dir_code, dir_name, CODE, NAME, top, stock_daily, status) self.writeFile(dir_code, dir_name, CODE, NAME, top, stock_daily, status)
if len(stock_daily['volume']) > 5: if len(stock_daily['volume']) > 5:
if stock_daily['envelope_lower'][0] is not None and stock_daily['envelope_lower'][1] is not None:
# BB 하단에 부딪힘 # BB 하단에 부딪힘
if stock_daily['close'][1] < stock_daily['envelope_lower'][1] and stock_daily['envelope_lower'][0] < stock_daily['close'][0]: if stock_daily['close'][1] < stock_daily['envelope_lower'][1] and stock_daily['envelope_lower'][0] < stock_daily['close'][0]:
dir_code = "16" dir_code = "16"