This commit is contained in:
dosangyoon
2021-08-31 02:41:25 +09:00
parent f84e1c65b6
commit 20b4054d91

View File

@@ -518,6 +518,10 @@ class Analyzer:
if isbuy > 0 and STOCK[last_index]['close'] < STOCK[last_index]['avg60']: if isbuy > 0 and STOCK[last_index]['close'] < STOCK[last_index]['avg60']:
isbuy = 2 isbuy = 2
# 위치에너지 < 0.4 and 볼린저밴드 < 0.3 이어야 한다.
if positionalEnergy < 30 or bolingerband_score < 0.3:
isbuy = 0
fig = self.draw(stock) fig = self.draw(stock)
title = "%s (%s), %s, buy_price (%d), stochastic(%.2f), bolingerband(%.2f), positionalEnergy(%.2f) 차트" % (item_name, item_code, state, buy_price, stochastic_score, bolingerband_score, positionalEnergy) title = "%s (%s), %s, buy_price (%d), stochastic(%.2f), bolingerband(%.2f), positionalEnergy(%.2f) 차트" % (item_name, item_code, state, buy_price, stochastic_score, bolingerband_score, positionalEnergy)
fig['layout'].update(title=title) fig['layout'].update(title=title)