From c4c8a7aa887bfb48fd1c774237fb837f4dcfcd62 Mon Sep 17 00:00:00 2001 From: dsyoon Date: Thu, 9 Nov 2023 20:16:58 +0900 Subject: [PATCH] init --- stock/analysis/Common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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