This commit is contained in:
dsyoon
2021-09-29 16:06:05 +09:00
parent df51b42a6d
commit bcb1492bea
2 changed files with 385 additions and 1 deletions

View File

@@ -590,10 +590,11 @@ class HTS:
buy_line[i+1] = low[i] + 5
check = False
"""
if low[i-2] < lower[i-2] and low[i-1] < lower[i-1] and low[i] < open[i] == close[i] < high[i] and open[i] - low[i] == high [i] - open[i]:
if not (open[i-2] < close[i-2] and open[i-1] < close[i-1]) and not (open[i-2] == close[i-2] or open[i-1] == close[i-1]):
buy_line[i+1] = high[i]
"""
# 팔 시점 체크
# 산 가격에 5원 위로 매도를 건다.
@@ -747,6 +748,7 @@ class HTS:
# 장부가의 마지막 자리수가 0,1,2 라면 (2090, 2091, 2092 -> 2095 에 매도)
self.requestOrder("1", stock_code, jangoDic[code]['매도가능'], sell_price + 5)
elif last_number in [3, 4, 5, 6]:
# 장부가의 마지막 자리수가 3,4,5,6 라면 (2093, 2094, 2095, 2096 -> 2100 에 매도)
self.requestOrder("1", stock_code, jangoDic[code]['매도가능'], sell_price + 10)
else: