From 0ee8e97b4c0627517085a24c5b5a16d5272625cc Mon Sep 17 00:00:00 2001 From: dsyoon Date: Sat, 29 Oct 2022 16:58:20 +0900 Subject: [PATCH] init --- stock/analysis/AnalyzerSqlite.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/stock/analysis/AnalyzerSqlite.py b/stock/analysis/AnalyzerSqlite.py index 4e72d13..26de24c 100644 --- a/stock/analysis/AnalyzerSqlite.py +++ b/stock/analysis/AnalyzerSqlite.py @@ -266,12 +266,14 @@ class AnalyzerSqlite: self.makeDir("monthly_6월선_36월선_상향돌파") self.makeDir("monthly_종가_12월선_상향돌파") + self.makeDir("monthly_macd_0이하") self.makeDir("monthly_rsi_20이하") self.makeDir("monthly_rsi_rsis_위로_올라옴") self.makeDir("monthly_BB하단_내려옴") self.makeDir("weekly_4주선_48주선_상향돌파") self.makeDir("weekly_종가_12주선_상향돌파") + self.makeDir("weekly_macd_0이하") self.makeDir("weekly_rsi_15이하") self.makeDir("weekly_rsi_rsis_위로_올라옴") self.makeDir("weekly_BB하단_내려옴") @@ -280,6 +282,7 @@ class AnalyzerSqlite: self.makeDir("daily_종가_60일선_상향돌파") self.makeDir("daily_3일선_10일선_상향돌파") self.makeDir("daily_3일선_10일선_하향돌파") + self.makeDir("daily_macd_0이하") self.makeDir("daily_rsi_10이하") self.makeDir("daily_이전에_없던_거래량") self.makeDir("daily_이격도") @@ -483,6 +486,15 @@ class AnalyzerSqlite: final_status_count += 1 self.writeFile(type, CODE, NAME, top, stock_monthly, status) + # MACD가 0 이하인 경우 + if len(stock_monthly['close']) > 1: + if stock_monthly['macd'][0] is not None: + if stock_monthly['macd'][0] <= 0: + type = "monthly_macd_0이하" + final_status += " " + type + final_status_count += 1 + self.writeFile(type, CODE, NAME, top, stock_monthly, status) + # RSI가 20 이하인 경우 if len(stock_monthly['close']) > 1: if stock_monthly['rsi'][0] is not None: @@ -544,6 +556,15 @@ class AnalyzerSqlite: final_status_count += 1 self.writeFile(type, CODE, NAME, top, stock_weekly, status) + # MACD가 0 이하인 경우 + if len(stock_monthly['close']) > 1: + if stock_weekly['macd'][0] is not None: + if stock_weekly['macd'][0] <= 0: + type = "weekly_macd_0이하" + final_status += " " + type + final_status_count += 1 + self.writeFile(type, CODE, NAME, top, stock_weekly, status) + # RSI가 15 이하인 경우 if len(stock_monthly['close']) > 1: if stock_weekly['rsi'][0] is not None: @@ -578,6 +599,15 @@ class AnalyzerSqlite: # 3) daily + if len(stock_daily['volume']) > 5: + # RSI가 10 이하인 경우 + if stock_daily['macd'][0] is not None: + if stock_daily['macd'][0] <= 10: + type = "daily_macd_0이하" + final_status += " " + type + final_status_count += 1 + self.writeFile(type, CODE, NAME, top, stock_daily, status) + if len(stock_daily['volume']) > 5: # RSI가 10 이하인 경우 if stock_daily['rsi'][0] is not None: