diff --git a/stock/analysis/Common.py b/stock/analysis/Common.py index 2fa4692..ed56b16 100644 --- a/stock/analysis/Common.py +++ b/stock/analysis/Common.py @@ -584,9 +584,9 @@ class Common: # 매수전략 #2: RSI 과매도 이후 골든크로스 if (stock['macd'][1] < stock['macds'][1] and stock['macds'][0] < stock['macd'][0]): canBuy = False - if 12 < len(stock['rsi']): - for c in range(1, 11): - if stock['rsi'][0 - c] < 10: + if 13 < len(stock['rsi']): + for c in range(1, 12): + if stock['rsi'][c] < 10: canBuy = True break if canBuy: @@ -598,7 +598,7 @@ class Common: index = 0 if 41 < len(stock['rsi']): for c in range(1, 41): - if stock['macd'][0 - c - 1] < stock['macds'][0 - c - 1] and stock['macds'][0 - c] < stock['macd'][0 - c]: + if stock['macd'][c+1] < stock['macds'][c+1] and stock['macds'][c] < stock['macd'][c]: canBuy = True index = c break