This commit is contained in:
dsyoon
2024-02-13 23:54:31 +09:00
parent 2f11258905
commit d5c85a9fae

View File

@@ -573,20 +573,22 @@ class Common:
i = len(stock['ymd']) - 1
check = False
for c in range(5):
# 추세가 상승 중일 때 매수의 관점 (소추세가 하락해 있을 때 매수의 기회)
if np.average(stock['avg60'][i - c - 3:i - c]) < stock['avg60'][i - c]:
if stock['avg60'][i - c] < stock['avg20'][i - c]:
if stock['slow_d'][i - c] < stock['slow_k'][i - c] and stock['slow_k'][i - c - 1] < stock['slow_k'][i - c] and stock['slow_k'][i - c] < 50:
if stock['close'][i - c] < stock['last_middle'][i - c] - (stock['last_middle'][i - c] - stock['last_min'][i - c]) * 0.5:
check = True
if 130 < i:
for c in range(5):
# 추세가 상승 중일 때 매수의 관점 (소추세가 하락해 있을 때 매수의 기회)
if np.average(stock['avg60'][i - c - 3:i - c]) < stock['avg60'][i - c]:
if stock['avg60'][i - c] < stock['avg20'][i - c]:
if stock['slow_d'][i - c] is not None and stock['slow_k'][i - c] is not None and stock['slow_k'][i - c - 1] is not None and stock['slow_k'][i - c] is not None and stock['slow_k'][i - c] is not None:
if stock['slow_d'][i - c] < stock['slow_k'][i - c] and stock['slow_k'][i - c - 1] < stock['slow_k'][i - c] and stock['slow_k'][i - c] < 50:
if stock['close'][i - c] < stock['last_middle'][i - c] - (stock['last_middle'][i - c] - stock['last_min'][i - c]) * 0.5:
check = True
# 거래량은 6시간 중 가장 많은 것보다 1.5배 이상 많고, 종가는 3시간 중에서 가장 높을 때
if np.max(stock['volume'][i - c - 120:i - c - 2]) * 1.5 < stock['volume'][i - c] and np.max(stock['close'][i - c - 20: i - c]) < stock['close'][i - c]:
if stock['open'][i - c - 1] < stock['close'][i - c - 1] and stock['close'][i - c - 1] - stock['open'][i - c - 1] < stock['close'][i - c] - stock['open'][i - c]:
# 양봉이고 몸통이 3/4 이상일 때
if stock['open'][i - c] < stock['close'][i - c] and stock['high'][i - c] - stock['close'][i - c] < (stock['close'][i - c] - stock['open'][i - c]) * 0.25:
check = True
# 거래량은 6시간 중 가장 많은 것보다 1.5배 이상 많고, 종가는 3시간 중에서 가장 높을 때
if np.max(stock['volume'][i - c - 120:i - c - 2]) * 1.5 < stock['volume'][i - c] and np.max(stock['close'][i - c - 20: i - c]) < stock['close'][i - c]:
if stock['open'][i - c - 1] < stock['close'][i - c - 1] and stock['close'][i - c - 1] - stock['open'][i - c - 1] < stock['close'][i - c] - stock['open'][i - c]:
# 양봉이고 몸통이 3/4 이상일 때
if stock['open'][i - c] < stock['close'][i - c] and stock['high'][i - c] - stock['close'][i - c] < (stock['close'][i - c] - stock['open'][i - c]) * 0.25:
check = True
return check