init
This commit is contained in:
@@ -957,10 +957,11 @@ class HTS:
|
||||
|
||||
final_price = 0
|
||||
print ("START...")
|
||||
while datetime.strptime(given_day + " 083000", '%Y%m%d %H%M%S') < datetime.now() < datetime.strptime(given_day + " 15200", '%Y%m%d %H%M%S'):
|
||||
#while datetime.strptime(given_day + " 070000", '%Y%m%d %H%M%S') < datetime.now() < datetime.strptime(given_day + " 15200", '%Y%m%d %H%M%S'):
|
||||
while datetime.strptime(given_day + " 070000", '%Y%m%d %H%M%S') < datetime.now() < datetime.strptime(given_day + " 18000", '%Y%m%d %H%M%S'):
|
||||
second = datetime.now().strftime('%Y%m%d %H%M%S')
|
||||
|
||||
if datetime.now() < datetime.strptime(given_day + " 151000", '%Y%m%d %H%M%S'):
|
||||
if datetime.now() < datetime.strptime(given_day + " 151900", '%Y%m%d %H%M%S'):
|
||||
if second in timecheck and not timecheck[second]:
|
||||
print("TIMECHECK", second)
|
||||
logFp.write("%s,%s,\n" %("TIMECHECK", second))
|
||||
@@ -1015,6 +1016,9 @@ class HTS:
|
||||
logFp.flush()
|
||||
|
||||
else:
|
||||
# 15:19:00 이후라면 모든 매수/매도 주문 취소하고 현재가-5원으로 매도한다.
|
||||
orderList = self.requestOrderList()
|
||||
|
||||
# 만약 잔고가 있으면 장부가보다 5원 높게 매도한다.
|
||||
jangoDic = self.requstJango()
|
||||
if jangoDic and len(jangoDic.keys()) > 0:
|
||||
|
||||
Reference in New Issue
Block a user