매수만 취소

This commit is contained in:
dosangyoon
2021-10-16 15:05:29 +09:00
parent 7e75b3fbd6
commit c1eb4c8fc8
2 changed files with 21 additions and 4 deletions

View File

@@ -200,10 +200,27 @@ class BuySellChecker:
### buy 분석 ###
################
# 1. slow_k가 25 아래 있으면 매수한다.
if data["slow_k"][i] <= 20:
buy = data["Low"][i]
if i < 30:
if data["slow_k"][i] <= 19:
if data["Close"][i] < data["avg5"][i]:
buy = data["Close"][i]
else:
buy = data["Low"][i]
else:
if data["slow_k"][i] <= 20:
if data["Close"][i] < data["avg5"][i]:
buy = data["Close"][i]
else:
buy = data["Low"][i]
if data["rsi"][i-1] < 10 and data["rsi"][i-1] < data["rsis"][i-1] and data["rsis"][i] < data["rsi"][i]:
if data["Close"][i] < data["avg5"][i]:
buy = data["Close"][i]
else:
buy = data["Low"][i]
# weight 분석
##################
### weight 분석 ###
##################
# rsi가 rsis 위로 올라오며 15 이하일 경우 10배로 주문함 (14:30 이전)
if data["rsi"][i] < 15 and data["rsis"][i] < 15 and data["rsi"][i - 1] < data["rsis"][i - 1] and data["rsis"][i] < data["rsi"][i]:
buy = data["Low"][i]

View File

@@ -17,7 +17,7 @@ class RSI:
self.common = Common()
return
def apply(sefl, df, period=14):
def apply(sefl, df, period=10):
# df.diff를 통해 (기준일 종가 - 기준일 전일 종가)를 계산하여 0보다 크면 증가분을 감소했으면 0을 넣어줌
U = np.where(df.close.diff(1) > 0, df.close.diff(1), 0)