diff --git a/hts/HTS_122630.py b/hts/HTS_122630.py index 3e77474..8f62231 100644 --- a/hts/HTS_122630.py +++ b/hts/HTS_122630.py @@ -617,6 +617,9 @@ class HTS_122630: timecheck[THIS_TIME] = True if datetime.strptime(GIVEN_DAY + " 151500", '%Y%m%d %H%M%S') < THIS_TIME: + #### + # 종가에 그냥 매도한다. + #### # 주문 리스트를 가져온다. orderList = self.requestOrderList() # 15:15:00 이후라면 모든 미체결 취소한다. diff --git a/hts/HTS_252670.py b/hts/HTS_252670.py index 2fc38a8..e2a6e69 100644 --- a/hts/HTS_252670.py +++ b/hts/HTS_252670.py @@ -617,24 +617,20 @@ class HTS_252670: timecheck[THIS_TIME] = True if datetime.strptime(GIVEN_DAY + " 151530", '%Y%m%d %H%M%S') < THIS_TIME: + #### + # 손해 보지 않는 가격에 매도한다. + #### + # 주문 리스트를 가져온다. orderList = self.requestOrderList() - # 15:15:00 이후라면 모든 미체결 취소한다. + # 15:10:00 이후라면 모든 미체결 취소한다. self.cancelOrderList(orderList) - # 데이터를 가지고 온다. - self.getRealTime(stock_code, GIVEN_DAY, result) - - # 분석을 통해서 볼린저밴드 상/하단을 계산한다. - data = self.buySellChecker.analyze(result) - data_size = len(data["Close"]) - final_price = data["Close"][data_size - 1] - # 매도 가격을 가져온다. selling_count, selling_price = self.getSellingPrice(final_price) # 분석되 가격으로 매도 요청한다. - if selling_count != 0 and selling_price !=0: - orderNum = self.requestOrder(OrderType.sell, stock_code, selling_count, final_price) + if selling_count != 0 and selling_price != 0: + orderNum = self.requestOrder(OrderType.sell, stock_code, selling_count, selling_price) # 로그 출력 print("SELL", THIS_TIME, selling_count, selling_price)