diff --git a/stock/analysis/Common.py b/stock/analysis/Common.py index bb2c158..a9ae161 100644 --- a/stock/analysis/Common.py +++ b/stock/analysis/Common.py @@ -643,9 +643,10 @@ class Common: check = True # slow_k가 10이하에서 상승 중이고 slow_d를 상승 돌파 할 때 - if stock['slow_k'][1] < stock['slow_d'][1] and stock['slow_d'][0] < stock['slow_k'][0] and stock['slow_k'][0] < 10: - if stock['avg120'][0] < stock['trend_k'][0]: - check = True + if stock['slow_k'][0] is not None and stock['slow_k'][1] is not None: + if stock['slow_k'][1] < stock['slow_d'][1] and stock['slow_d'][0] < stock['slow_k'][0] and stock['slow_k'][0] < 10: + if stock['avg120'][0] < stock['trend_k'][0]: + check = True return check