init
This commit is contained in:
@@ -138,6 +138,9 @@ class HTS_etf (HTS):
|
||||
if items is not None and len(items)>0:
|
||||
slow_k_month = items[0]
|
||||
|
||||
if slow_k_week is None: slow_k_week = -1
|
||||
if slow_k_month is None: slow_k_month = -1
|
||||
|
||||
return slow_k_week, slow_k_month
|
||||
|
||||
def buyRealTime(self, today, stocks, analyzed_day=1000):
|
||||
@@ -157,12 +160,14 @@ class HTS_etf (HTS):
|
||||
# 매도를 체크한다.
|
||||
self.sellStocks()
|
||||
|
||||
for stock in stocks:
|
||||
for idx, stock in enumerate(stocks):
|
||||
|
||||
time.sleep(0.1)
|
||||
|
||||
print(idx, stock['stock_code'], stock['stock_name'])
|
||||
|
||||
slow_k_week, slow_k_month = self.getSlowK(stock['stock_code'])
|
||||
if slow_k_week < 0 or 20 < slow_k_week or slow_k_month < 0 or 20 < slow_k_month:
|
||||
if slow_k_week < 0 or 50 < slow_k_week or slow_k_month < 0 or 50 < slow_k_month:
|
||||
continue
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user