init
This commit is contained in:
@@ -514,14 +514,15 @@ class Analyzer:
|
|||||||
isbuy = 0
|
isbuy = 0
|
||||||
|
|
||||||
if stochastic_score < 20 and bolingerband_score < 0.3:
|
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 이어야 한다.
|
# 위치에너지 < 0.4 and 볼린저밴드 < 0.3 이어야 한다.
|
||||||
if positionalEnergy < 0.2 or bolingerband_score < 0.2:
|
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
|
isbuy = 2
|
||||||
|
|
||||||
|
# 위치에너지가 낮거나 240일선 아래에 있는 상태에서 상태값을 갖는 경우 매수한다.
|
||||||
if isbuy > 0 and state != "":
|
if isbuy > 0 and state != "":
|
||||||
isbuy = 3
|
isbuy = 3
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user