From f8331a98e81b5aec071dfa410b0826e3425c845d Mon Sep 17 00:00:00 2001 From: dosangyoon Date: Wed, 22 Sep 2021 22:00:18 +0900 Subject: [PATCH] init --- hts/HTS.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hts/HTS.py b/hts/HTS.py index 1f094e6..a42dcc4 100644 --- a/hts/HTS.py +++ b/hts/HTS.py @@ -247,7 +247,7 @@ class HTS: #날짜,시간,시가,고가,저가,종가,거래량 #20210909,900,2070,2070,2070,2070,0 - outFp = open(day+".csv", "w") + outFp = open(day+".csv", mode="w", encoding="UTF-8") outFp.write("날짜,시간,시가,고가,저가,종가,거래량\n") for i in range(len(result["time"])): outFp.write("%s,%s,%s,%s,%s,%s,%s\n"%( @@ -486,7 +486,7 @@ class HTS: self.getRealTime(stock_code, given_day, result) # 가져온 만큼 데이터를 누적해서 파일로 작성한다. - #self.write(given_day, result) + self.write(given_day, result) # 분석을 통해서 볼린저밴드 상/하단을 계산한다. #data, upper, lower, buy_line, sell_line = self.analyze(result)