This commit is contained in:
dsyoon
2021-09-10 23:04:03 +09:00
parent 6f8534c06c
commit f598aeaff4

View File

@@ -513,7 +513,7 @@ class Analyzer:
isbuy = 0
# 종가가 240일선 아래에 있으면 매수한다.
if isbuy > 0 and STOCK[last_index]['close'] < STOCK[last_index]['avg60']:
if isbuy > 0 and STOCK[last_index]['close'] < STOCK[last_index]['avg240']:
isbuy = 1
# 위치에너지 < 0.4 and 볼린저밴드 < 0.3 이어야 한다.
@@ -534,11 +534,11 @@ class Analyzer:
# (KOSPI: 2011년 8월 11일)
# 오늘 양봉이어야 한다.
if STOCK[last_index]['open'] < STOCK[last_index]['close']:
isbuy = 3
isbuy = 9
# (KOSPI: 2011년 9월 26일)
# 오늘 음봉이라면, 오늘 시가는 어제 종가보다 높아야 하고, 오늘 종가는 어제 시가보다 높아야 한다.
if (STOCK[last_index]['close'] < STOCK[last_index]['open']) and (STOCK[last_index-1]['close'] < STOCK[last_index]['open'] and STOCK[last_index-1]['open'] < STOCK[last_index]['close']):
isbuy = 3
isbuy = 9
if isbuy >= 3 and state != "":
isbuy = 4