init
This commit is contained in:
@@ -350,6 +350,11 @@ class Analyzer:
|
||||
status += eveningstar_status
|
||||
"""
|
||||
|
||||
# 위치에너지
|
||||
positional_egergy_status = self.common.checkPotentialEnergy(STOCK, i)
|
||||
if positional_egergy_status != "":
|
||||
status += positional_egergy_status
|
||||
|
||||
return status, buy_price
|
||||
|
||||
# 그래프 출력
|
||||
@@ -405,6 +410,8 @@ class Analyzer:
|
||||
else:
|
||||
bolingerband_score = round(((STOCK[last_index]['close']-BOLINGERBAND[last_index]['lower'])/(BOLINGERBAND[last_index]['upper']-BOLINGERBAND[last_index]['lower'])), 2)
|
||||
|
||||
if item_code == "108230":
|
||||
print (1)
|
||||
|
||||
if stochastic_score < 40 and bolingerband_score < 0.4:
|
||||
|
||||
@@ -413,16 +420,16 @@ class Analyzer:
|
||||
|
||||
if state != "":
|
||||
fig = self.draw(stock)
|
||||
title = "%s (%s), %s, buy_price (%d), stochastic(%.1f), bolingerband(%.1f) 차트" % (item_name, item_code, state, buy_price, stochastic_score, bolingerband_score)
|
||||
title = "%s (%s), %s, buy_price (%d), stochastic(%.2f), bolingerband(%.2f) 차트" % (item_name, item_code, state, buy_price, stochastic_score, bolingerband_score)
|
||||
fig['layout'].update(title=title)
|
||||
fileName = "%s/%s__b(%.1f)__s(%.1f)__%s_%s.html" % (outPath, state, bolingerband_score, stochastic_score, item_name.replace(" ", ""), item_code)
|
||||
fileName = "%s/%s__b(%.2f)__s(%.2f)__%s_%s.html" % (outPath, state, bolingerband_score, stochastic_score, item_name.replace(" ", ""), item_code)
|
||||
po.write_html(fig, file=fileName, auto_open=False)
|
||||
else:
|
||||
if STOCK[last_index]['volume'] > 1000000:
|
||||
fig = self.draw(stock)
|
||||
title = "%s (%s) buy_price (%d), stochastic(%.1f), bolingerband(%.1f) 차트"%(item_name, item_code, buy_price, stochastic_score, bolingerband_score)
|
||||
title = "%s (%s) buy_price (%d), stochastic(%.2f), bolingerband(%.2f) 차트"%(item_name, item_code, buy_price, stochastic_score, bolingerband_score)
|
||||
fig['layout'].update(title=title)
|
||||
fileName = "%s/b(%.1f)__s(%.1f)__%s_%s.html"%(tmp_path, bolingerband_score, stochastic_score, item_name.replace(" ", ""), item_code)
|
||||
fileName = "%s/b(%.2f)__s(%.2f)__%s_%s.html"%(tmp_path, bolingerband_score, stochastic_score, item_name.replace(" ", ""), item_code)
|
||||
po.write_html(fig, file=fileName, auto_open=False)
|
||||
|
||||
rowid += 1
|
||||
|
||||
@@ -536,8 +536,8 @@ class Common:
|
||||
|
||||
if top - bottom > 0:
|
||||
energy = (price - bottom) / (top - bottom)
|
||||
if 0.1 < energy < 0.5:
|
||||
return "p(" + str(round(energy*100, 1)) + ")_"
|
||||
if energy < 0.4:
|
||||
return "p(" + str(round(energy, 2)) + ")_"
|
||||
return ""
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user