This commit is contained in:
dsyoon
2022-07-18 13:23:45 +09:00
parent f28d6c6709
commit 3d32b39931
2 changed files with 4 additions and 6 deletions

View File

@@ -186,7 +186,7 @@ if __name__ == "__main__":
# KODEX 인버스 * 2 # KODEX 인버스 * 2
stock_code = "122630" stock_code = "122630"
buy_count = 40 buy_count = 50
hts = HTS_122630(stock_code, buy_count) hts = HTS_122630(stock_code, buy_count)
today_str = today.strftime('%Y%m%d') today_str = today.strftime('%Y%m%d')

View File

@@ -155,9 +155,6 @@ class HTS_252670 (HTS):
# 3시 15분 30초부터 3시 16분 사이는 잔량을 매도한다. # 3시 15분 30초부터 3시 16분 사이는 잔량을 매도한다.
if not final_sell_check: if not final_sell_check:
####
# 손해 보지 않는 가격에 매도한다.
####
# 주문 리스트를 가져온다. # 주문 리스트를 가져온다.
orderList = self.requestOrderList() orderList = self.requestOrderList()
@@ -167,7 +164,8 @@ class HTS_252670 (HTS):
# 매도 가격을 가져온다. # 매도 가격을 가져온다.
result = self.getRealTime(self.stock_code, lastday, today) result = self.getRealTime(self.stock_code, lastday, today)
final_price = result["close"][len(result["close"]) - 1] final_price = result["close"][len(result["close"]) - 1]
selling_count, selling_price = self.getFinalSellingPrice(final_price) #selling_count, selling_price = self.getFinalSellingPrice(final_price)
selling_count, selling_price = self.getSellingPrice(final_price)
# 분석되 가격으로 매도 요청한다. # 분석되 가격으로 매도 요청한다.
if selling_count != 0 and selling_price != 0: if selling_count != 0 and selling_price != 0:
orderNum = self.requestOrder(OrderType.sell, self.stock_code, selling_count, selling_price) orderNum = self.requestOrder(OrderType.sell, self.stock_code, selling_count, selling_price)
@@ -190,7 +188,7 @@ if __name__ == "__main__":
# KODEX 인버스 * 2 # KODEX 인버스 * 2
stock_code = "252670" stock_code = "252670"
buy_count = 300 buy_count = 200
hts = HTS_252670(stock_code, buy_count) hts = HTS_252670(stock_code, buy_count)
today_str = today.strftime('%Y%m%d') today_str = today.strftime('%Y%m%d')