This commit is contained in:
dsyoon
2023-04-13 23:40:42 +09:00
parent 0548a77cc4
commit ae43531cfb
3 changed files with 17 additions and 49 deletions

View File

@@ -257,19 +257,11 @@ class HTS_etf (HTS):
try:
# 데이터를 가지고 온다.
result = self.getRealTime(stock['stock_code'], today, LAST_DATA[stock['stock_code']])
data = self.getRealTime(stock['stock_code'], today, LAST_DATA[stock['stock_code']])
except:
print("#ERROR:", stock['stock_code'], stock['stock_name'])
continue
result_5 = self.makeTickData(result, mins=5)
result_30 = self.makeTickData(result, mins=30)
if len(result_30['time']) < 100:
continue
data = self.buySellChecker.analyze(result)
data.drop(data.index[:len(data) - analyzed_day], inplace=True)
# 현재 매수가
bs_buy_price = data["close"][len(data["close"]) - 1]
@@ -281,7 +273,7 @@ class HTS_etf (HTS):
if bs_buy_price > 1000:
if not self.orderChecker.exist(today, "A" + stock['stock_code'], hours=9):
if not self.orderChecker.exist(today, "A" + stock['stock_code'], hours=5):
stock_type = self.getStockType(stock['stock_code'], short=True)
buy_count = self.getBuyCount(bs_buy_price, kospi_type, stock_type)