init
This commit is contained in:
@@ -290,6 +290,24 @@ class Analyzer:
|
||||
if STOCK[i]['volume'] > 100000 and STOCK[i]['close'] > 2000:
|
||||
# 거래량이 100만 이상이고, 종가가 1천원 이상인지 체크 (https://happpy-rich.tistory.com/94)
|
||||
|
||||
# 5-20
|
||||
days20_line_buying1_status = self.common.check_days20_line_buying1(STOCK, i)
|
||||
if days20_line_buying1_status != "":
|
||||
#if STOCHASTIC[i]['slow_k'] < 40:
|
||||
status += days20_line_buying1_status
|
||||
|
||||
# 5-60
|
||||
days60_line_buying1_status = self.common.check_days60_line_buying1(STOCK, i)
|
||||
if days60_line_buying1_status != "":
|
||||
# if STOCHASTIC[i]['slow_k'] < 40:
|
||||
status += days60_line_buying1_status
|
||||
|
||||
# 20-60
|
||||
days60_line_buying2_status = self.common.check_days60_line_buying2(STOCK, i)
|
||||
if days60_line_buying2_status != "":
|
||||
#if STOCHASTIC[i]['slow_k'] < 40:
|
||||
status += days60_line_buying2_status
|
||||
|
||||
all_upper_cross_status = self.common.checkAllUpperCross(STOCK, i)
|
||||
if all_upper_cross_status != "":
|
||||
status += all_upper_cross_status
|
||||
@@ -312,16 +330,6 @@ class Analyzer:
|
||||
if stochastic_buying_status != "":
|
||||
status += stochastic_buying_status
|
||||
|
||||
# 20
|
||||
if self.common.check_20days_line_buying(STOCK, i):
|
||||
if STOCHASTIC[i]['slow_k'] < 40:
|
||||
status += '20_'
|
||||
|
||||
# 60
|
||||
if self.common.check_60days_line_buying(STOCK, i):
|
||||
if STOCHASTIC[i]['slow_k'] < 40:
|
||||
status += '60_'
|
||||
|
||||
# STOCHASTIC
|
||||
stochastic_status = self.common.check_stochastic(STOCK, STOCHASTIC, i)
|
||||
if stochastic_status != "":
|
||||
@@ -387,14 +395,14 @@ class Analyzer:
|
||||
|
||||
if state != "":
|
||||
fig = self.draw(stock)
|
||||
title = "%s (%s), %s, buy_price (%d), stochastic(%.3f), rsi(%.3f), macd(%.3f), ichimoku(%d)) 차트" % (item_name, item_code, state, buy_price, stochastic_score, rsi_score, macd_score, ichimoku_score)
|
||||
title = "%s (%s), %s, buy_price (%d), stochastic(%.3f), rsi(%.3f), macd(%.3f), ichimoku(%d) 차트" % (item_name, item_code, state, buy_price, stochastic_score, rsi_score, macd_score, ichimoku_score)
|
||||
fig['layout'].update(title=title)
|
||||
fileName = "%s/%s__%.3f__%.3f__%s_%s.html" % (outPath, state, stochastic_score, rsi_score, item_name.replace(" ", ""), item_code)
|
||||
po.write_html(fig, file=fileName, auto_open=False)
|
||||
else:
|
||||
if (RSI[last_index]['rsi_buy'] == 1) and STOCK[last_index]['volume'] > 1000000:
|
||||
fig = self.draw(stock)
|
||||
title = "%s (%s) buy_price (%d), stochastic(%.3f), rsi(%.3f), macd(%.3f), ichimoku(%d)) 차트"%(item_name, item_code, buy_price, stochastic_score, rsi_score, macd_score, ichimoku_score)
|
||||
title = "%s (%s) buy_price (%d), stochastic(%.3f), rsi(%.3f), macd(%.3f), ichimoku(%d) 차트"%(item_name, item_code, buy_price, stochastic_score, rsi_score, macd_score, ichimoku_score)
|
||||
fig['layout'].update(title=title)
|
||||
fileName = "%s/%.3f__%.3f__%s_%s.html"%(tmp_path, stochastic_score, rsi_score, item_name.replace(" ", ""), item_code)
|
||||
po.write_html(fig, file=fileName, auto_open=False)
|
||||
|
||||
Reference in New Issue
Block a user