This commit is contained in:
dsyoon
2023-02-20 23:31:45 +09:00
parent 6ff98b55d0
commit 83669f2733
3 changed files with 13 additions and 8 deletions

View File

@@ -113,7 +113,7 @@ class HTS_Stocks (HTS):
for i, item in enumerate(items):
valid_company[item[0]] = i
return all_stocks, list(valid_company)
return all_stocks, valid_company
def getSlowK(self, stock_code):
slow_k_week, slow_k_month = -1, -1
@@ -173,7 +173,8 @@ class HTS_Stocks (HTS):
re.search("\d.*?호", stock_name) is not None) and
stock_code not in valid_company):
continue
print(idx, stock_code, stock_name)
print("%5d: %8s, %-50s" % (idx, stock_code, stock_name))
slow_k_week, slow_k_month = self.getSlowK(stock_code)
if slow_k_week < 0 or 50 < slow_k_week or slow_k_month < 0 or 50 < slow_k_month: