This commit is contained in:
dsyoon
2021-10-03 19:06:35 +09:00
parent 9719b24d95
commit bd7d56e102

View File

@@ -546,7 +546,7 @@ class HTS:
return data, upper, lower
def draw(self, given_day, data, upper, lower, bsLine):
def draw(self, stock_code, given_day, data, upper, lower, bsLine):
buy_line = bsLine['buy']
sell_line = bsLine['sell']
@@ -593,7 +593,7 @@ class HTS:
# 그래프를 그린다.
fig = go.Figure(data=[candle_stick, bolinger_upper, bolinger_lower, buy_check, sell_check, avg5, avg20, avg60, avg120, avg240])
fig.update_layout(title=given_day + "_2x")
fig.update_layout(title=stock_code + "_" + given_day)
fig.show()
return
@@ -845,7 +845,7 @@ class HTS:
bsLine = self.checkTransaction_Simulation(data, upper, lower)
# 그래프를 그린다.
self.draw(given_day, data, upper, lower, bsLine)
self.draw(stock_code, given_day, data, upper, lower, bsLine)
# 가져온 만큼 데이터를 누적해서 파일로 작성한다.
self.write(given_day, result)
@@ -982,7 +982,8 @@ if __name__ == "__main__":
given_days = ['20210901','20210902','20210903','20210906','20210907','20210908','20210909','20210910','20210913','20210914','20210915','20210916','20210917','20210923','20210924','20210927','20210928','20210929','20210930','20211001']
for given_day in given_days:
hts.writeStockData(stock_codes, given_day)
#hts.simulate(stock_codes, given_day)
#for stock_code in stock_codes:
#hts.simulate(stock_codes, given_day)
#hts.buyRealTime(stock_codes, given_day)