init
This commit is contained in:
@@ -407,7 +407,6 @@ class AnalyzerSqlite:
|
||||
if os.path.isdir(outPath):
|
||||
shutil.rmtree(outPath)
|
||||
os.mkdir(outPath)
|
||||
self.makeDir("final")
|
||||
|
||||
self.makeDir("monthly_macd_n이하")
|
||||
self.makeDir("monthly_rsi_n이하")
|
||||
@@ -424,6 +423,8 @@ class AnalyzerSqlite:
|
||||
self.makeDir("daily_EV하단_내려옴")
|
||||
self.makeDir("daily_BB하단_내려옴")
|
||||
|
||||
self.makeDir("99. 최종 관심 종목")
|
||||
|
||||
return
|
||||
|
||||
# 후보 찾기
|
||||
@@ -471,14 +472,14 @@ class AnalyzerSqlite:
|
||||
check = self.common.check_macd(stock_monthly, -300)
|
||||
if check:
|
||||
dir_name = "monthly_macd_n이하"
|
||||
log = "{:.2f}".format(stock_monthly['macd'][0])
|
||||
log = "MACD_"+"{:.2f}".format(stock_monthly['macd'][0])
|
||||
self.writeFile(dir_name, CODE, NAME, top, stock_monthly, log)
|
||||
|
||||
# RSI가 20 이하인 경우, rsi가 rsis위로 올라온 경우
|
||||
check = self.common.check_rsi(stock_monthly, 20)
|
||||
if check:
|
||||
dir_name = "monthly_rsi_n이하"
|
||||
log = "{:.2f}".format(stock_monthly['rsi'][0])
|
||||
log = "RSI_"+"{:.2f}".format(stock_monthly['rsi'][0])
|
||||
self.writeFile(dir_name, CODE, NAME, top, stock_monthly, log)
|
||||
|
||||
# Weekly 체크
|
||||
@@ -488,14 +489,14 @@ class AnalyzerSqlite:
|
||||
check = self.common.check_macd(stock_weekly, -300)
|
||||
if check:
|
||||
dir_name = "weekly_macd_n이하"
|
||||
log = "{:.2f}".format(stock_weekly['macd'][0])
|
||||
log = "MACD_"+"{:.2f}".format(stock_weekly['macd'][0])
|
||||
self.writeFile(dir_name, CODE, NAME, top, stock_weekly, log)
|
||||
|
||||
# RSI가 20 이하인 경우, rsi가 rsis위로 올라온 경우
|
||||
check = self.common.check_rsi(stock_weekly, 20)
|
||||
if check:
|
||||
dir_name = "weekly_rsi_n이하"
|
||||
log = "{:.2f}".format(stock_weekly['rsi'][0])
|
||||
log = "RSI_"+"{:.2f}".format(stock_weekly['rsi'][0])
|
||||
self.writeFile(dir_name, CODE, NAME, top, stock_weekly, log)
|
||||
|
||||
|
||||
@@ -504,14 +505,14 @@ class AnalyzerSqlite:
|
||||
check = self.common.check_macd(stock_daily, -1000)
|
||||
if check:
|
||||
dir_name = "daily_macd_n이하"
|
||||
log = "{:.2f}".format(stock_daily['macd'][0])
|
||||
log = "MACD_"+"{:.2f}".format(stock_daily['macd'][0])
|
||||
self.writeFile(dir_name, CODE, NAME, top, stock_daily, log)
|
||||
|
||||
# RSI가 10 이하인 경우
|
||||
check = self.common.check_rsi(stock_daily, 10)
|
||||
if check:
|
||||
dir_name = "daily_rsi_n이하"
|
||||
log = "{:.2f}".format(stock_daily['macd'][0])
|
||||
log = "RSI_"+"{:.2f}".format(stock_daily['macd'][0])
|
||||
self.writeFile(dir_name, CODE, NAME, top, stock_daily, log)
|
||||
|
||||
|
||||
@@ -519,33 +520,34 @@ class AnalyzerSqlite:
|
||||
check, log = self.common.check_volume(stock_daily)
|
||||
if check:
|
||||
dir_name = "daily_이전에_없던_거래량"
|
||||
log = "이전없던거래량_" + log
|
||||
self.writeFile(dir_name, CODE, NAME, top, stock_daily, log)
|
||||
|
||||
# daily_이격도
|
||||
check = self.common.check_disparity(stock_daily)
|
||||
if check:
|
||||
dir_name = "daily_이격도"
|
||||
log = str(top)
|
||||
log = "이격도_" + str(top)
|
||||
self.writeFile(dir_name, CODE, NAME, top, stock_daily, log)
|
||||
|
||||
# daily_낙폭과대 (60% 이상 하락)
|
||||
check, log = self.common.check_excessive_drop(stock_daily)
|
||||
if check:
|
||||
dir_name = "daily_낙폭과대"
|
||||
log = log + "_" + str(top)
|
||||
log = "낙폭과대_" + log
|
||||
self.writeFile(dir_name, CODE, NAME, top, stock_daily, log)
|
||||
|
||||
# daily_EV하단_내려옴
|
||||
check = self.common.check_under_EV_Low(stock_daily)
|
||||
if check:
|
||||
dir_name = "daily_EV하단_내려옴"
|
||||
log = str(top)
|
||||
log = "EV_" + str(top)
|
||||
self.writeFile(dir_name, CODE, NAME, top, stock_daily, log)
|
||||
|
||||
check = self.common.check_under_BB_Low(stock_daily)
|
||||
if check:
|
||||
dir_name = "daily_BB하단_내려옴"
|
||||
log = str(top)
|
||||
log = "BB_" + str(top)
|
||||
self.writeFile(dir_name, CODE, NAME, top, stock_daily, log)
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user