init
This commit is contained in:
@@ -171,7 +171,7 @@ class AnalyzerSqlite:
|
|||||||
trend_k = list(reversed(stock['trend_k']))
|
trend_k = list(reversed(stock['trend_k']))
|
||||||
|
|
||||||
# general
|
# general
|
||||||
candle_stick = go.Candlestick(x=ymd, open=open, high=high, low=low, close=close, increasing_line_color='red', decreasing_line_color='blue')
|
candle_stick = go.Candlestick(x=ymd, open=open, high=high, low=low, close=close, increasing_line_color='red', decreasing_line_color='blue', name='candle')
|
||||||
#avg3 = go.Scatter(x=ymd, y=avg3, name="avg3", line_color='#085F1B')
|
#avg3 = go.Scatter(x=ymd, y=avg3, name="avg3", line_color='#085F1B')
|
||||||
#avg4 = go.Scatter(x=ymd, y=avg4, name="avg4", line_color='#085F1B')
|
#avg4 = go.Scatter(x=ymd, y=avg4, name="avg4", line_color='#085F1B')
|
||||||
avg5 = go.Scatter(x=ymd, y=avg5, name="avg5", line_color='#ff0000')
|
avg5 = go.Scatter(x=ymd, y=avg5, name="avg5", line_color='#ff0000')
|
||||||
|
|||||||
@@ -570,8 +570,7 @@ class Common:
|
|||||||
if len(stock['trend']) < 10:
|
if len(stock['trend']) < 10:
|
||||||
return check
|
return check
|
||||||
|
|
||||||
if np.average(stock['trend'][1:21]) < stock['trend'][0] and np.average(stock['trend_k'][1:21]) < \
|
if np.average(stock['trend'][1:21]) < stock['trend'][0] and np.average(stock['trend_k'][1:21]) < stock['trend_k'][0]:
|
||||||
stock['trend_k'][0]:
|
|
||||||
# 1일 트렌드가 시그널 위로 상승 돌파 할 때
|
# 1일 트렌드가 시그널 위로 상승 돌파 할 때
|
||||||
if stock['trend_k'][1] <= stock['trend_s'][1] and stock['trend_s'][0] < stock['trend_k'][0]:
|
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를 상승 돌파)
|
# macd가 0 이하에서 macd 매수 체크 (macd가 macds를 상승 돌파)
|
||||||
if stock['macd'][1] < stock['macds'][1] and stock['macds'][0] < stock['macd'][0] and stock['macd'][
|
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:
|
||||||
0] < np.min(stock['macd'][1:]) * 0.5:
|
|
||||||
if stock['avg120'][0] < stock['trend_k'][0]:
|
if stock['avg120'][0] < stock['trend_k'][0]:
|
||||||
# slow_k가 50이하에서 상승 중이고 slow_d를 상승 돌파 할 때
|
# slow_k가 50이하에서 상승 중이고 slow_d를 상승 돌파 할 때
|
||||||
check = True
|
check = True
|
||||||
|
|
||||||
# slow_k가 10이하에서 상승 중이고 slow_d를 상승 돌파 할 때
|
# 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'][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 \
|
if stock['slow_k'][1] < stock['slow_d'][1] and stock['slow_d'][0] < stock['slow_k'][0] and stock['slow_k'][0] < 10:
|
||||||
stock['slow_k'][0] < 10:
|
|
||||||
if stock['avg120'][0] < stock['trend_k'][0]:
|
if stock['avg120'][0] < stock['trend_k'][0]:
|
||||||
check = True
|
check = True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user