This commit is contained in:
dsyoon
2021-07-24 17:34:53 +09:00
parent ed791e0b56
commit 04b47cffc3
2 changed files with 49 additions and 13 deletions

View File

@@ -210,6 +210,13 @@ class Analyzer:
# if STOCHASTIC[i]['slow_k'] < 40: # if STOCHASTIC[i]['slow_k'] < 40:
status += temp_status status += temp_status
# 음봉인데 어제보다 종가가 더 높은 경우
# 이 경우 정배열 상태인지도 함께 체크를 한다.
higher_umbong_status = self.common.checkHigherUmbong(STOCK, i)
if higher_umbong_status != "":
status += higher_umbong_status
"""
# 단타 #1 # 단타 #1
temp_status = self.common.check_Danta1(STOCK, i) temp_status = self.common.check_Danta1(STOCK, i)
if temp_status != "": if temp_status != "":
@@ -231,10 +238,11 @@ class Analyzer:
if W1Rise != "": if W1Rise != "":
status += W1Rise status += W1Rise
# 1일 동안 몇 10% 이상 내 종목 # 1일 동안 몇 10% 이상 내 종목
W1Fall = self.common.check_D1Fall(STOCK, i, -0.1) W1Fall = self.common.check_D1Fall(STOCK, i, -0.1)
if W1Fall != "": if W1Fall != "":
status += W1Fall status += W1Fall
"""
# GOLDENCROSS#1은 바로 매수하지 않고, 이 시점 이후로 5일선이 20일선을 하방으로 뚫었다가 다시 20일선을 상방으로 뚫는 순간 매수를 시도한다. # GOLDENCROSS#1은 바로 매수하지 않고, 이 시점 이후로 5일선이 20일선을 하방으로 뚫었다가 다시 20일선을 상방으로 뚫는 순간 매수를 시도한다.
# GOLDENCROSS#2은 바로 매수 가능 # GOLDENCROSS#2은 바로 매수 가능
@@ -243,11 +251,13 @@ class Analyzer:
if golden_cross_status != "": if golden_cross_status != "":
status += golden_cross_status status += golden_cross_status
"""
# BUYINGBEARMARKET#1은 바로 매수 가능 # BUYINGBEARMARKET#1은 바로 매수 가능
# BUYINGBEARMARKET#2은 바로 매수 가능 # BUYINGBEARMARKET#2은 바로 매수 가능
bearmarket_buying_status = self.common.check_bearmarket_buying(STOCK, STOCHASTIC, i) bearmarket_buying_status = self.common.check_bearmarket_buying(STOCK, STOCHASTIC, i)
if bearmarket_buying_status != "": if bearmarket_buying_status != "":
status += bearmarket_buying_status status += bearmarket_buying_status
"""
# STOCHASTIC # STOCHASTIC
stochastic_status = self.common.check_stochastic(STOCK, STOCHASTIC, i) stochastic_status = self.common.check_stochastic(STOCK, STOCHASTIC, i)
@@ -255,10 +265,12 @@ class Analyzer:
status += stochastic_status status += stochastic_status
# YANGBONG # YANGBONG
"""
longYangBongAfterUmBong_status = self.common.checkLongYangBongAfterUmBong(STOCK, i) longYangBongAfterUmBong_status = self.common.checkLongYangBongAfterUmBong(STOCK, i)
# 어제 음봉 이후 장대양봉이었다면, # 어제 음봉 이후 장대양봉이었다면,
if longYangBongAfterUmBong_status != "": if longYangBongAfterUmBong_status != "":
status += longYangBongAfterUmBong_status status += longYangBongAfterUmBong_status
"""
# Doji # Doji
doji_status = self.common.checkDoji(STOCK, i) doji_status = self.common.checkDoji(STOCK, i)
@@ -266,14 +278,15 @@ class Analyzer:
if doji_status != "": if doji_status != "":
status += doji_status status += doji_status
""" """---------------------------------
# Gravestone # Gravestone
gravestone_status = self.common.checkGravestone(STOCK, i) gravestone_status = self.common.checkGravestone(STOCK, i)
# 상승 추세에서 그레이브스톤이 나오면 매도 # 상승 추세에서 그레이브스톤이 나오면 매도
if gravestone_status != "": if gravestone_status != "":
status += gravestone_status status += gravestone_status
""" ---------------------------------"""
"""
# Dragonfly # Dragonfly
dragonfly_status = self.common.checkDragonfly(STOCK, i) dragonfly_status = self.common.checkDragonfly(STOCK, i)
# 하락 추세에서 드레곤플라이가 나오면 매수 # 하락 추세에서 드레곤플라이가 나오면 매수
@@ -285,76 +298,86 @@ class Analyzer:
# 하락 추세에서 해머가 나오면 매수 # 하락 추세에서 해머가 나오면 매수
if hammer_status != "": if hammer_status != "":
status += hammer_status status += hammer_status
""" """
"""---------------------------------
# Hangingman # Hangingman
hangingman_status = self.common.checkHangingman(STOCK, i) hangingman_status = self.common.checkHangingman(STOCK, i)
# 상승 추세에서 행잉맨이 나오면 매도 # 상승 추세에서 행잉맨이 나오면 매도
if hangingman_status != "": if hangingman_status != "":
status += hangingman_status status += hangingman_status
""" ---------------------------------"""
"""
# 상승장악형 (Engulfing) - 다음 날도 양봉이라면 매수 # 상승장악형 (Engulfing) - 다음 날도 양봉이라면 매수
engulfing_status = self.common.checkEngulfingHigh(STOCK, i) engulfing_status = self.common.checkEngulfingHigh(STOCK, i)
# 하락 추세에서 상승장악형이 나오면 매수 # 하락 추세에서 상승장악형이 나오면 매수
if engulfing_status != "": if engulfing_status != "":
status += engulfing_status status += engulfing_status
""" """
"""---------------------------------
# 하락장악형 (Engulfing) # 하락장악형 (Engulfing)
engulfing_status = self.common.checkEngulfingLow(STOCK, i) engulfing_status = self.common.checkEngulfingLow(STOCK, i)
# 상승 추세에서 하락장악형이 나오면 매도 # 상승 추세에서 하락장악형이 나오면 매도
if engulfing_status != "": if engulfing_status != "":
status += engulfing_status status += engulfing_status
""" ---------------------------------"""
"""
# 상승 포아형 (Harami) # 상승 포아형 (Harami)
harami_status = self.common.checkHaramiHigh(STOCK, i) harami_status = self.common.checkHaramiHigh(STOCK, i)
# 하락 추세에서 상승포아형이 나오면 매수 # 하락 추세에서 상승포아형이 나오면 매수
if harami_status != "": if harami_status != "":
status += harami_status status += harami_status
""" """
"""---------------------------------
# 하락 포아형 (Harami) # 하락 포아형 (Harami)
harami_status = self.common.checkHaramiLow(STOCK, i) harami_status = self.common.checkHaramiLow(STOCK, i)
# 상승 추세에서 하락포아형이 나오면 매도 # 상승 추세에서 하락포아형이 나오면 매도
if harami_status != "": if harami_status != "":
status += harami_status status += harami_status
""" ---------------------------------"""
"""
# 관통형 (piercing) # 관통형 (piercing)
piercing_status = self.common.checkPiercing(STOCK, i) piercing_status = self.common.checkPiercing(STOCK, i)
# 하락 추세에서 관통형이 나오면 매수 # 하락 추세에서 관통형이 나오면 매수
if piercing_status != "": if piercing_status != "":
status += piercing_status status += piercing_status
""" """
"""---------------------------------
# 흑운형 (Dark-cloud) # 흑운형 (Dark-cloud)
darkcloud_status = self.common.checkDarkCloud(STOCK, i) darkcloud_status = self.common.checkDarkCloud(STOCK, i)
# 상승 추세에서 흑운형이 나오면 매도 # 상승 추세에서 흑운형이 나오면 매도
if darkcloud_status != "": if darkcloud_status != "":
status += darkcloud_status status += darkcloud_status
""" ---------------------------------"""
"""
# 샛별 (Morning start) # 샛별 (Morning start)
morningstar_status = self.common.checkMorningstar(STOCK, i) morningstar_status = self.common.checkMorningstar(STOCK, i)
# 하락 추세에서 샛별형이 나오면 매수 # 하락 추세에서 샛별형이 나오면 매수
if morningstar_status != "": if morningstar_status != "":
status += morningstar_status status += morningstar_status
""" """
"""---------------------------------
# 저녁별 (Evening start) # 저녁별 (Evening start)
eveningstar_status = self.common.checkEveningstar(STOCK, i) eveningstar_status = self.common.checkEveningstar(STOCK, i)
# 상승 추세에서 저녁별형이 나오면 매도 # 상승 추세에서 저녁별형이 나오면 매도
if eveningstar_status != "": if eveningstar_status != "":
status += eveningstar_status status += eveningstar_status
""" ---------------------------------"""
# 위치에너지 # 위치에너지
positional_egergy_status = self.common.checkPotentialEnergy(STOCK, i) positional_egergy_status = self.common.checkPotentialEnergy(STOCK, i)
if positional_egergy_status != "": if positional_egergy_status != "":
status += positional_egergy_status status += positional_egergy_status
return status, buy_price return status, buy_price
# 그래프 출력 # 그래프 출력

View File

@@ -540,6 +540,19 @@ class Common:
return "p(" + str(round(energy, 2)) + ")_" return "p(" + str(round(energy, 2)) + ")_"
return "" return ""
def checkHigherUmbong(self, stock, i):
# 음봉인데 어제보다 종가가 더 높은 경우
# 이 경우 정배열 상태인지도 함께 체크를 한다.
if len(stock) > 3:
# 어제는 거래량이 터진 양봉이다.
if stock[i-1]['open'] < stock[i-1]['close'] and 5*stock[i-2]['volume'] < stock[i-1]['volume']:
# 오늘은 음봉인데, 오늘 종가는 어제 시가보다는 높다
if stock[i]['close'] < stock[i]['open'] and stock[i-1]['open'] < stock[i]['close']:
return "HIGHERUMBONG_"
return ""
def check_W1Rise(self, stock, i, limit): def check_W1Rise(self, stock, i, limit):
if len(stock) > 5: if len(stock) > 5: