init
This commit is contained in:
@@ -269,21 +269,13 @@ class AnalyzerSqlite:
|
||||
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하단_내려옴")
|
||||
|
||||
self.makeDir("daily_BB하단_내려옴")
|
||||
self.makeDir("daily_종가_60일선_상향돌파")
|
||||
self.makeDir("daily_3일선_10일선_상향돌파")
|
||||
self.makeDir("daily_3일선_10일선_하향돌파")
|
||||
self.makeDir("daily_macd_0이하")
|
||||
self.makeDir("daily_macd_100이하")
|
||||
self.makeDir("daily_rsi_10이하")
|
||||
self.makeDir("daily_이전에_없던_거래량")
|
||||
self.makeDir("daily_이격도")
|
||||
@@ -507,16 +499,6 @@ class AnalyzerSqlite:
|
||||
final_status_count += 1
|
||||
self.writeFile(type, CODE, NAME, top, stock_monthly, status)
|
||||
|
||||
# rsi가 rsis 아래에서 위로 올라올 때
|
||||
if len(stock_monthly['close']) > 60:
|
||||
if stock_monthly['rsi'][0] is not None and stock_monthly['rsis'][0] is not None and stock_monthly['rsi'][1] is not None and stock_monthly['rsis'][1] is not None:
|
||||
if stock_monthly['rsi'][0] < 40:
|
||||
if stock_monthly['rsi'][0] > stock_monthly['rsis'][0] and stock_monthly['rsi'][1] <= stock_monthly['rsis'][1]:
|
||||
type = "monthly_rsi_rsis_위로_올라옴"
|
||||
#final_status += " " + type
|
||||
#final_status_count += 1
|
||||
self.writeFile(type, CODE, NAME, top, stock_monthly, status)
|
||||
|
||||
if len(stock_monthly['volume']) > 5:
|
||||
# BB 하단에 부딪힘
|
||||
for c_index in range(1, 5):
|
||||
@@ -559,15 +541,6 @@ 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:
|
||||
@@ -577,26 +550,6 @@ class AnalyzerSqlite:
|
||||
final_status_count += 1
|
||||
self.writeFile(type, CODE, NAME, top, stock_weekly, status)
|
||||
|
||||
# rsi가 40 이하이고, rsis 아래에서 위로 올라올 때
|
||||
if len(stock_weekly['close']) > 60:
|
||||
if stock_weekly['rsi'][0] is not None and stock_weekly['rsis'][0] is not None and stock_weekly['rsi'][1] is not None and stock_weekly['rsis'][1] is not None:
|
||||
if stock_weekly['rsi'][0] < 40:
|
||||
if stock_weekly['rsi'][0] > stock_weekly['rsis'][0] and stock_weekly['rsi'][1] <= stock_weekly['rsis'][1]:
|
||||
type = "weekly_rsi_rsis_위로_올라옴"
|
||||
#final_status += " " + type
|
||||
#final_status_count += 1
|
||||
self.writeFile(type, CODE, NAME, top, stock_weekly, status)
|
||||
|
||||
if len(stock_weekly['volume']) > 6:
|
||||
# BB 하단에 부딪힘
|
||||
for c_index in range(1, 5):
|
||||
if stock_weekly['bolingerband_lower'][c_index+1] is not None and stock_weekly['close'][c_index] <= (stock_weekly['bolingerband_lower'][c_index+1]):
|
||||
type = "weekly_BB하단_내려옴"
|
||||
final_status += " " + type
|
||||
final_status_count += 1
|
||||
self.writeFile(type, CODE, NAME, top, stock_weekly, status)
|
||||
break
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -606,16 +559,7 @@ class AnalyzerSqlite:
|
||||
# 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:
|
||||
if stock_daily['rsi'][0] <= 10:
|
||||
type = "daily_rsi_10이하"
|
||||
type = "daily_macd_100이하"
|
||||
final_status += " " + type
|
||||
final_status_count += 1
|
||||
self.writeFile(type, CODE, NAME, top, stock_daily, status)
|
||||
@@ -640,46 +584,6 @@ class AnalyzerSqlite:
|
||||
final_status_count += 1
|
||||
self.writeFile(type, CODE, NAME, top, stock_daily, status)
|
||||
|
||||
# BB 하단에 내려옴
|
||||
for c_index in range(1, 5):
|
||||
if stock_daily['bolingerband_lower'][c_index+1] is None:
|
||||
break
|
||||
|
||||
if stock_daily['close'][c_index] <= (stock_daily['bolingerband_lower'][c_index + 1]):
|
||||
type = "daily_BB하단_내려옴"
|
||||
final_status += " " + type
|
||||
final_status_count += 1
|
||||
self.writeFile(type, CODE, NAME, top, stock_daily, status)
|
||||
break
|
||||
|
||||
# 종가가 60일선을 상향 돌파함
|
||||
if len(stock_daily['close']) > 60:
|
||||
if stock_daily['close'][1] is not None and stock_daily['avg60'][1] is not None and stock_daily['close'][0] is not None and stock_daily['avg60'][0] is not None:
|
||||
if stock_daily['close'][1] <= stock_daily['avg60'][1] and stock_daily['close'][0] > stock_daily['avg60'][0]:
|
||||
type = "daily_종가_60일선_상향돌파"
|
||||
final_status += " " + type
|
||||
final_status_count += 1
|
||||
self.writeFile(type, CODE, NAME, top, stock_daily, status)
|
||||
|
||||
# [Dailly]
|
||||
if (stock_daily['avg3'][0] >= stock_daily['avg10'][0] and
|
||||
stock_daily['avg3'][1] <= stock_daily['avg10'][1] and
|
||||
stock_daily['avg3'][2] <= stock_daily['avg10'][2] and
|
||||
stock_daily['avg3'][3] <= stock_daily['avg10'][3]):
|
||||
type = "daily_3일선_10일선_상향돌파"
|
||||
final_status += " " + type
|
||||
final_status_count += 1
|
||||
self.writeFile(type, CODE, NAME, top, stock_weekly, status)
|
||||
|
||||
if (stock_daily['avg3'][0] <= stock_daily['avg10'][0] and
|
||||
stock_daily['avg3'][1] >= stock_daily['avg10'][1] and
|
||||
stock_daily['avg3'][2] >= stock_daily['avg10'][2] and
|
||||
stock_daily['avg3'][3] >= stock_daily['avg10'][3]):
|
||||
type = "daily_3일선_10일선_하향돌파"
|
||||
final_status += " " + type
|
||||
final_status_count += 1
|
||||
self.writeFile(type, CODE, NAME, top, stock_weekly, status)
|
||||
|
||||
# daily_weekly_monthly_rsi_10_20_30이하
|
||||
if len(stock_monthly['close']) > 1:
|
||||
if stock_monthly['rsi'][0] is not None and stock_weekly['rsi'][0] is not None and stock_daily['rsi'][0] is not None:
|
||||
@@ -689,7 +593,7 @@ class AnalyzerSqlite:
|
||||
final_status_count += 1
|
||||
self.writeFile(type, CODE, NAME, top, stock_daily, status)
|
||||
|
||||
if final_status_count > 0:
|
||||
if final_status_count >= 6:
|
||||
type = "final"
|
||||
self.writeFile(type, CODE, NAME, top, stock_daily, final_status, final_status_count)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user