init
This commit is contained in:
@@ -61,10 +61,12 @@ if week in (0, 1, 2, 3, 4):
|
|||||||
|
|
||||||
analyzerSqlite = AnalyzerSqlite(PROJECT_HOME, stockFileName)
|
analyzerSqlite = AnalyzerSqlite(PROJECT_HOME, stockFileName)
|
||||||
print("\n[종목 결정]")
|
print("\n[종목 결정]")
|
||||||
|
# HTML 출력
|
||||||
|
outPath = os.path.join(PROJECT_HOME, "resources", "analysis")
|
||||||
|
if not os.path.isdir(outPath):
|
||||||
|
os.mkdir(outPath)
|
||||||
day = datetime.today().strftime("%Y%m%d")
|
day = datetime.today().strftime("%Y%m%d")
|
||||||
if not os.path.isdir(PROJECT_HOME + "/resources/analysis"):
|
outPath = os.path.join(outPath, day)
|
||||||
os.mkdir(PROJECT_HOME + "/resources/analysis")
|
|
||||||
outPath = PROJECT_HOME + "/resources/analysis/" + day
|
|
||||||
if os.path.isdir(outPath):
|
if os.path.isdir(outPath):
|
||||||
shutil.rmtree(outPath)
|
shutil.rmtree(outPath)
|
||||||
os.mkdir(outPath)
|
os.mkdir(outPath)
|
||||||
|
|||||||
@@ -414,26 +414,6 @@ class AnalyzerSqlite:
|
|||||||
|
|
||||||
# 종목 상태 체크 분석
|
# 종목 상태 체크 분석
|
||||||
|
|
||||||
# [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)
|
|
||||||
|
|
||||||
|
|
||||||
# [Weekly]
|
# [Weekly]
|
||||||
# 정배열 체크
|
# 정배열 체크
|
||||||
temp_status = self.common.check_RightArrange(stock_weekly)
|
temp_status = self.common.check_RightArrange(stock_weekly)
|
||||||
@@ -584,6 +564,25 @@ class AnalyzerSqlite:
|
|||||||
final_status_count += 1
|
final_status_count += 1
|
||||||
self.writeFile(type, CODE, NAME, top, stock_daily, status)
|
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)
|
||||||
|
|
||||||
if final_status_count > 0:
|
if final_status_count > 0:
|
||||||
type = "final"
|
type = "final"
|
||||||
self.writeFile(type, CODE, NAME, top, stock_daily, final_status, final_status_count)
|
self.writeFile(type, CODE, NAME, top, stock_daily, final_status, final_status_count)
|
||||||
@@ -914,12 +913,12 @@ if __name__ == "__main__":
|
|||||||
#analyzer.analyzeGrouping("weekly")
|
#analyzer.analyzeGrouping("weekly")
|
||||||
#analyzer.analyzeGrouping("monthly")
|
#analyzer.analyzeGrouping("monthly")
|
||||||
|
|
||||||
day = datetime.today().strftime("%Y%m%d")
|
|
||||||
|
|
||||||
# HTML 출력
|
# HTML 출력
|
||||||
if not os.path.isdir(PROJECT_HOME + "/resources/analysis"):
|
outPath = os.path.join(PROJECT_HOME, "resources", "analysis")
|
||||||
os.mkdir(PROJECT_HOME + "/resources/analysis")
|
if not os.path.isdir(outPath):
|
||||||
outPath = PROJECT_HOME + "/resources/analysis/"+day
|
os.mkdir(outPath)
|
||||||
|
day = datetime.today().strftime("%Y%m%d")
|
||||||
|
outPath = os.path.join(outPath, day)
|
||||||
if os.path.isdir(outPath):
|
if os.path.isdir(outPath):
|
||||||
shutil.rmtree(outPath)
|
shutil.rmtree(outPath)
|
||||||
os.mkdir(outPath)
|
os.mkdir(outPath)
|
||||||
|
|||||||
Reference in New Issue
Block a user