init
This commit is contained in:
@@ -179,24 +179,22 @@ 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)
|
||||||
data = self.stockStatus.analyze(stock, self.analyzed_day)
|
data = self.stockStatus.analyze(stock, self.analyzed_day)
|
||||||
except:
|
except:
|
||||||
print ("#ERROR:", stock_code, stock_name)
|
print("#ERROR:", stock_code, stock_name)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# 분석일 데이터만 활용한다 (이전 데이터는 제거)
|
# 분석일 데이터만 활용한다 (이전 데이터는 제거)
|
||||||
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user