From 0472e226994677c23ce4da475c5119f8b39eb1bc Mon Sep 17 00:00:00 2001 From: dosangyoon Date: Mon, 7 Feb 2022 04:45:12 +0900 Subject: [PATCH] init --- stockpredictor/analysis/AnalyzerSqlite.py | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/stockpredictor/analysis/AnalyzerSqlite.py b/stockpredictor/analysis/AnalyzerSqlite.py index bfe33d0..5f5b121 100644 --- a/stockpredictor/analysis/AnalyzerSqlite.py +++ b/stockpredictor/analysis/AnalyzerSqlite.py @@ -534,10 +534,10 @@ class AnalyzerSqlite: # 1_기준선 위 전환선 올라옴 if len(close) > 50: if ((ichimokucloud_changeLine[0] > ichimokucloud_baseLine[0] and - ichimokucloud_changeLine[1] < ichimokucloud_baseLine[1] and - ichimokucloud_changeLine[2] < ichimokucloud_baseLine[2] and - ichimokucloud_changeLine[3] < ichimokucloud_baseLine[3] and - ichimokucloud_changeLine[4] < ichimokucloud_baseLine[4]) and + ichimokucloud_changeLine[1] <= ichimokucloud_baseLine[1] and + ichimokucloud_changeLine[2] <= ichimokucloud_baseLine[2] and + ichimokucloud_changeLine[3] <= ichimokucloud_baseLine[3] and + ichimokucloud_changeLine[4] <= ichimokucloud_baseLine[4]) and volume[0] > volume[1]): type = "1_기준선 위 전환선 올라옴" self.writeFile(type, CODE, NAME, stock, state) @@ -545,10 +545,10 @@ class AnalyzerSqlite: # "1_기준선 위 120일선 올라옴" if len(close) > 50: if ((avg120[0] > ichimokucloud_baseLine[0] and - avg120[1] < ichimokucloud_baseLine[1] and - avg120[2] < ichimokucloud_baseLine[2] and - avg120[3] < ichimokucloud_baseLine[3] and - avg120[4] < ichimokucloud_baseLine[4]) and + avg120[1] <= ichimokucloud_baseLine[1] and + avg120[2] <= ichimokucloud_baseLine[2] and + avg120[3] <= ichimokucloud_baseLine[3] and + avg120[4] <= ichimokucloud_baseLine[4]) and volume[0] > volume[1]): type = "1_기준선 위 120일선 올라옴" self.writeFile(type, CODE, NAME, stock, state) @@ -556,10 +556,10 @@ class AnalyzerSqlite: # "1_기준선 위 200일선 올라옴" if len(close) > 50: if ((avg200[0] > ichimokucloud_baseLine[0] and - avg200[1] < ichimokucloud_baseLine[1] and - avg200[2] < ichimokucloud_baseLine[2] and - avg200[3] < ichimokucloud_baseLine[3] and - avg200[4] < ichimokucloud_baseLine[4]) and + avg200[1] <= ichimokucloud_baseLine[1] and + avg200[2] <= ichimokucloud_baseLine[2] and + avg200[3] <= ichimokucloud_baseLine[3] and + avg200[4] <= ichimokucloud_baseLine[4]) and volume[0] > volume[1]): type = "1_기준선 위 200일선 올라옴" self.writeFile(type, CODE, NAME, stock, state) @@ -567,21 +567,21 @@ class AnalyzerSqlite: # "1_기준선 위 240일선 올라옴" if len(close) > 50: if ((avg240[0] > ichimokucloud_baseLine[0] and - avg240[1] < ichimokucloud_baseLine[1] and - avg240[2] < ichimokucloud_baseLine[2] and - avg240[3] < ichimokucloud_baseLine[3] and - avg240[4] < ichimokucloud_baseLine[4]) and + avg240[1] <= ichimokucloud_baseLine[1] and + avg240[2] <= ichimokucloud_baseLine[2] and + avg240[3] <= ichimokucloud_baseLine[3] and + avg240[4] <= ichimokucloud_baseLine[4]) and volume[0] > volume[1]): type = "1_기준선 위 240일선 올라옴" self.writeFile(type, CODE, NAME, stock, state) # 1_종가가 200일선 돌파 - if close[0] > avg200[0] and close[1] < avg200[1] and close[2] < avg200[2] and close[3] < avg200[3] and close[4] < avg200[4]: + if len(close) > 5 and close[0] >= avg200[0] and close[1] < avg200[1] and close[2] < avg200[2] and close[3] < avg200[3] and close[4] < avg200[4]: type = "1_200일선 돌파" self.writeFile(type, CODE, NAME, stock, state) # 1_종가가 240일선 돌파 - if close[0] > avg240[0] and close[1] < avg240[1] and close[2] < avg240[2] and close[3] < avg240[3] and close[4] < avg240[4]: + if len(close) > 5 and close[0] >= avg240[0] and close[1] < avg240[1] and close[2] < avg240[2] and close[3] < avg240[3] and close[4] < avg240[4]: type = "1_240일선 돌파" self.writeFile(type, CODE, NAME, stock, state)