From 8dc4928ad8aca45b055fa731cbe98f09f4642a49 Mon Sep 17 00:00:00 2001 From: dsyoon Date: Fri, 24 Feb 2023 23:54:31 +0900 Subject: [PATCH] init --- HTS_stocks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HTS_stocks.py b/HTS_stocks.py index 6cc6d5a..766531e 100644 --- a/HTS_stocks.py +++ b/HTS_stocks.py @@ -120,11 +120,11 @@ class HTS_Stocks (HTS): slow_k_week, p_slow_k_week, slow_k_month, p_slow_k_month = -1, -1, -1, -1 self.cursor_stock.execute('select stochastic_slow_k, max(ymd) from stock_analysis_weekly where code=? group by 1 order by ymd desc', (stock_code, )) items = self.cursor_stock.fetchone() - if items is not None and len(items)>0: + if items is not None and len(items)>1: slow_k_week, p_slow_k_week = items[0], items[1] self.cursor_stock.execute('select stochastic_slow_k, max(ymd) from stock_analysis_monthly where code=? group by 1 order by ymd desc', (stock_code, )) items = self.cursor_stock.fetchone() - if items is not None and len(items)>0: + if items is not None and len(items)>1: slow_k_month, p_slow_k_month = items[0], items[1] if slow_k_week is None or p_slow_k_week is None: