This commit is contained in:
dsyoon
2021-09-28 20:46:01 +09:00
parent 926fe8ba78
commit 7fec0a390b

View File

@@ -638,6 +638,8 @@ class HTS:
return return
def buyRealTime(self, stock_code, given_day): def buyRealTime(self, stock_code, given_day):
data, upper, lower = None, None, None
previous_price = 0 previous_price = 0
buy_count = 700 buy_count = 700
total_byu_amt = 0 total_byu_amt = 0
@@ -736,7 +738,8 @@ class HTS:
# 장부가 가격의 마지막 자리를 0으로 만든다. (2092 -> 2090, 2098 -> 2090) # 장부가 가격의 마지막 자리를 0으로 만든다. (2092 -> 2090, 2098 -> 2090)
sell_price = int(jangoDic[code]['장부가'] / 10) * 10 sell_price = int(jangoDic[code]['장부가'] / 10) * 10
# 만약 오후 1시 이전이라면 한 호가 (5원) 더 올려서 매도한다. # 만약 오후 1시 이전이라면 한 호가 (5원) 더 올려서 매도한다.
if datetime.now() < datetime.strptime(given_day + " 101000", '%Y%m%d %H%M%S'): if datetime.now() < datetime.strptime(given_day + " 104000", '%Y%m%d %H%M%S'):
if lower[len(lower)-2] < lower[len(lower)-1]:
sell_price += 5 sell_price += 5
if last_number in [0, 1, 2]: if last_number in [0, 1, 2]: