From 526e5ab20685196035fd7a09f59fd56ed2a54955 Mon Sep 17 00:00:00 2001 From: dsyoon Date: Wed, 8 Nov 2023 23:14:48 +0900 Subject: [PATCH] init --- stock/analysis/Common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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