diff --git a/stock/analysis/Common.py b/stock/analysis/Common.py index ed56b16..4da79e1 100644 --- a/stock/analysis/Common.py +++ b/stock/analysis/Common.py @@ -602,8 +602,8 @@ class Common: canBuy = True index = c break - if canBuy and stock['rsi'][0 - index] < 30: - if (stock['macd'][0 - index] < stock['macd'][0] and min(stock['open'][0], stock['close'][0]) < min(stock['open'][0 - index], stock['close'][0 - index])): + if canBuy and stock['rsi'][index] < 30: + if (stock['macd'][index] < stock['macd'][0] and min(stock['open'][0], stock['close'][0]) < min(stock['open'][index], stock['close'][index])): return True return False