This commit is contained in:
dsyoon
2021-09-11 14:24:34 +09:00
parent ac5a6c0cbc
commit 4d9f2a8c60

View File

@@ -514,14 +514,15 @@ class Analyzer:
isbuy = 0
if stochastic_score < 20 and bolingerband_score < 0.3:
# 종가가 240일선 아래에 있으면 매수한다.
if isbuy > 0 and STOCK[last_index]['close'] < STOCK[last_index]['avg240']:
isbuy = 1
# 위치에너지 < 0.4 and 볼린저밴드 < 0.3 이어야 한다.
if positionalEnergy < 0.2 or bolingerband_score < 0.2:
isbuy = 1
# 종가가 240일선 아래에 있으면 매수한다.
if isbuy > 0 and STOCK[last_index]['close'] < STOCK[last_index]['avg240']:
isbuy = 2
# 위치에너지가 낮거나 240일선 아래에 있는 상태에서 상태값을 갖는 경우 매수한다.
if isbuy > 0 and state != "":
isbuy = 3