From e7cca43152a17c20d6bd4ed5b2e0e2c2759f8474 Mon Sep 17 00:00:00 2001 From: dsyoon Date: Mon, 27 Feb 2023 14:14:30 +0900 Subject: [PATCH] init --- HTS_etf.py | 2 ++ HTS_stocks.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/HTS_etf.py b/HTS_etf.py index 19dab35..2c62eda 100644 --- a/HTS_etf.py +++ b/HTS_etf.py @@ -184,9 +184,11 @@ class HTS_etf (HTS): slow_k_kospi, p_slow_k_kospi, slow_k_week_kospi, p_slow_k_week_kospi, slow_k_month_kospi, p_slow_k_month_kospi = self.getSlowK("^KS11") if (50 < slow_k_kospi or 50 < p_slow_k_kospi or (slow_k_kospi < 50 and p_slow_k_kospi < 50 and slow_k_kospi < p_slow_k_kospi)): + print("#1 매수/매도 일이 아닙니다.", slow_k_kospi, p_slow_k_kospi) VALID_DAY = False if ((0 < slow_k_week_kospi < 50 and 0 < slow_k_month_kospi < 50) and not ((20 < slow_k_week_kospi and slow_k_week_kospi < p_slow_k_week_kospi) or (20 < slow_k_month_kospi and slow_k_month_kospi < p_slow_k_month_kospi))): + print("#2 매수/매도 일이 아닙니다.", p_slow_k_week_kospi, slow_k_week_kospi, p_slow_k_month_kospi, slow_k_month_kospi) VALID_DAY = False LAST_DATA = {} diff --git a/HTS_stocks.py b/HTS_stocks.py index f76b5c9..2d07978 100644 --- a/HTS_stocks.py +++ b/HTS_stocks.py @@ -187,9 +187,11 @@ class HTS_Stocks (HTS): slow_k_kospi, p_slow_k_kospi, slow_k_week_kospi, p_slow_k_week_kospi, slow_k_month_kospi, p_slow_k_month_kospi = self.getSlowK("^KS11") if (50 < slow_k_kospi or 50 < p_slow_k_kospi or (slow_k_kospi < 50 and p_slow_k_kospi < 50 and slow_k_kospi < p_slow_k_kospi)): + print("#1 매수/매도 일이 아닙니다.", slow_k_kospi, p_slow_k_kospi) VALID_DAY = False if ((0 < slow_k_week_kospi < 50 and 0 < slow_k_month_kospi < 50) and not ((20 < slow_k_week_kospi and slow_k_week_kospi < p_slow_k_week_kospi) or (20 < slow_k_month_kospi and slow_k_month_kospi < p_slow_k_month_kospi))): + print("#2 매수/매도 일이 아닙니다.", p_slow_k_week_kospi, slow_k_week_kospi, p_slow_k_month_kospi, slow_k_month_kospi) VALID_DAY = False all_stocks, valid_company = self.getCompanyInfo()