This commit is contained in:
dsyoon
2023-02-01 14:06:09 +09:00
parent e938024ec5
commit a409e5c07c
3 changed files with 8 additions and 5 deletions

View File

@@ -137,14 +137,14 @@ class HTS_Stocks (HTS):
# 미체결 기록을 가져와서 10분 이상 된 매수 주문을 취소 한다.
ORDER_LIST = self.requestOrderList()
orderListToCancel = self.orderChecker.cancel(today, "A" + stock_code, ORDER_LIST, mins=60)
orderListToCancel = self.orderChecker.cancel(today, "A" + stock_code, ORDER_LIST, mins=10)
if len(orderListToCancel) > 0:
self.cancelOrderList(orderListToCancel)
# 다음 조건이면 매수한다.
if len(data) > 10 and max(bsLine['buy'][len(bsLine['buy']) - 1:]) > 1000:
if not self.orderChecker.exist(today, "A" + stock_code, mins=10):
if not self.orderChecker.exist(today, "A" + stock_code, hours=2):
last_index = len(bsLine['buy'])-1
if bsLine['buy'][last_index] > 0: