This commit is contained in:
dsyoon
2023-02-25 00:07:31 +09:00
parent ae0d0ce315
commit a5a8763787

View File

@@ -179,11 +179,6 @@ class HTS_Stocks (HTS):
print("%5d: %8s, %-50s" % (idx, stock_code, stock_name)) print("%5d: %8s, %-50s" % (idx, stock_code, stock_name))
slow_k_week, p_slow_k_week, slow_k_month, p_slow_k_month = self.getSlowK(stock_code)
if 0 < slow_k_week < 50 and 0 < slow_k_month < 50:
if ((20 < slow_k_week and p_slow_k_week < slow_k_week) or (20 < slow_k_month and p_slow_k_month < slow_k_month)):
continue
stock = self.stockStatus.fetchLastData(self.cursor_stock, stock_code, n) stock = self.stockStatus.fetchLastData(self.cursor_stock, stock_code, n)
try: try:
self.getRealTime_DailyCheck(today, stock_code, stock) self.getRealTime_DailyCheck(today, stock_code, stock)
@@ -194,9 +189,12 @@ class HTS_Stocks (HTS):
# 분석일 데이터만 활용한다 (이전 데이터는 제거) # 분석일 데이터만 활용한다 (이전 데이터는 제거)
data.drop(data.index[:len(data) - self.analyzed_day], inplace=True) data.drop(data.index[:len(data) - self.analyzed_day], inplace=True)
bsLine, data = self.buySellChecker.checkTransactionWithEnvelope(data, stock_code, self.analyzed_day, isRealTime=False) bsLine, data = self.buySellChecker.checkTransactionWithEnvelope(data, stock_code, self.analyzed_day, isRealTime=False)
slow_k_week, p_slow_k_week, slow_k_month, p_slow_k_month = self.getSlowK(stock_code)
if ((0 < slow_k_week < 50 and 0 < slow_k_month < 50) and
not ((20 < slow_k_week and slow_k_week < p_slow_k_week) or (20 < slow_k_month and slow_k_month < p_slow_k_month))):
# 미체결 기록을 가져와서 10분 이상 된 매수 주문을 취소 한다. # 미체결 기록을 가져와서 10분 이상 된 매수 주문을 취소 한다.
ORDER_LIST = self.requestOrderList() ORDER_LIST = self.requestOrderList()
orderListToCancel = self.orderChecker.cancel(today, "A" + stock_code, ORDER_LIST, mins=10) orderListToCancel = self.orderChecker.cancel(today, "A" + stock_code, ORDER_LIST, mins=10)