This commit is contained in:
dosangyoon
2022-09-04 00:32:43 +09:00
parent 4a27e64b6f
commit 2d40f4e5be
5 changed files with 94 additions and 390 deletions

View File

@@ -62,6 +62,7 @@ class HTS_252670 (HTS):
if datetime.strptime(today + " 090000", '%Y%m%d %H%M%S') < THIS_TIME < datetime.strptime(today + " 151500", '%Y%m%d %H%M%S'):
# 3시 까지만 매수를 시도한다.
"""
if THIS_TIME < datetime.strptime(today + " 145000", '%Y%m%d %H%M%S'):
if THIS_TIME.strftime('%S') in ("06", "16", "26", "36", "46", "56"):
# 데이터를 가지고 온다.
@@ -70,7 +71,7 @@ class HTS_252670 (HTS):
# 10초마다 체크하여 체결된 내역이 있으면 50원 높게 매도를 주문한다.
self.getSellingPrice(THIS_TIME, self.stock_code, final_price)
"""
if THIS_TIME.strftime('%S') == "03":
# 매분 3초마다 실행한다.
@@ -178,7 +179,7 @@ if __name__ == "__main__":
# KODEX 인버스 * 2
stock_code = "252670"
stock_name = "KODEX 200선물인버스2X"
buy_count = 900
buy_count = 300
hts = HTS_252670(RESOURCE_PATH, stock_code, buy_count)
today_str = today.strftime('%Y%m%d')