매수만 취소
This commit is contained in:
@@ -200,10 +200,27 @@ class BuySellChecker:
|
||||
### buy 분석 ###
|
||||
################
|
||||
# 1. slow_k가 25 아래 있으면 매수한다.
|
||||
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]
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user