init
This commit is contained in:
@@ -179,23 +179,21 @@ class HTS_Stocks (HTS):
|
||||
|
||||
print("%5d: %8s, %-50s" % (idx, stock_code, stock_name))
|
||||
|
||||
stock = self.stockStatus.fetchLastData(self.cursor_stock, stock_code, n)
|
||||
try:
|
||||
self.getRealTime_DailyCheck(today, stock_code, stock)
|
||||
data = self.stockStatus.analyze(stock, self.analyzed_day)
|
||||
except:
|
||||
print("#ERROR:", stock_code, stock_name)
|
||||
continue
|
||||
|
||||
# 분석일 데이터만 활용한다 (이전 데이터는 제거)
|
||||
data.drop(data.index[:len(data) - self.analyzed_day], inplace=True)
|
||||
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:
|
||||
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)
|
||||
try:
|
||||
self.getRealTime_DailyCheck(today, stock_code, stock)
|
||||
data = self.stockStatus.analyze(stock, self.analyzed_day)
|
||||
except:
|
||||
print ("#ERROR:", stock_code, stock_name)
|
||||
continue
|
||||
|
||||
# 분석일 데이터만 활용한다 (이전 데이터는 제거)
|
||||
data.drop(data.index[:len(data) - self.analyzed_day], inplace=True)
|
||||
|
||||
bsLine, data = self.buySellChecker.checkTransactionWithEnvelope(data, stock_code, self.analyzed_day, isRealTime=False)
|
||||
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분 이상 된 매수 주문을 취소 한다.
|
||||
ORDER_LIST = self.requestOrderList()
|
||||
|
||||
Reference in New Issue
Block a user