This commit is contained in:
dsyoon
2024-02-12 23:50:53 +09:00
parent 0a1b9e7e07
commit eddc6a14e2
2 changed files with 4 additions and 7 deletions

View File

@@ -570,8 +570,7 @@ class Common:
if len(stock['trend']) < 10:
return check
if np.average(stock['trend'][1:21]) < stock['trend'][0] and np.average(stock['trend_k'][1:21]) < \
stock['trend_k'][0]:
if np.average(stock['trend'][1:21]) < stock['trend'][0] and np.average(stock['trend_k'][1:21]) < stock['trend_k'][0]:
# 1일 트렌드가 시그널 위로 상승 돌파 할 때
if stock['trend_k'][1] <= stock['trend_s'][1] and stock['trend_s'][0] < stock['trend_k'][0]:
@@ -582,16 +581,14 @@ class Common:
# 추세가 상승 중일 때 매수의 관점 (소추세가 하락해 있을 때 매수의 기회)
# macd가 0 이하에서 macd 매수 체크 (macd가 macds를 상승 돌파)
if stock['macd'][1] < stock['macds'][1] and stock['macds'][0] < stock['macd'][0] and stock['macd'][
0] < np.min(stock['macd'][1:]) * 0.5:
if stock['macd'][1] < stock['macds'][1] and stock['macds'][0] < stock['macd'][0] and stock['macd'][0] < np.min(stock['macd'][1:]) * 0.5:
if stock['avg120'][0] < stock['trend_k'][0]:
# slow_k가 50이하에서 상승 중이고 slow_d를 상승 돌파 할 때
check = True
# slow_k가 10이하에서 상승 중이고 slow_d를 상승 돌파 할 때
if stock['slow_k'][0] is not None and stock['slow_k'][1] is not None:
if stock['slow_k'][1] < stock['slow_d'][1] and stock['slow_d'][0] < stock['slow_k'][0] and \
stock['slow_k'][0] < 10:
if stock['slow_k'][1] < stock['slow_d'][1] and stock['slow_d'][0] < stock['slow_k'][0] and stock['slow_k'][0] < 10:
if stock['avg120'][0] < stock['trend_k'][0]:
check = True