This commit is contained in:
dsyoon
2023-10-17 21:37:19 +09:00
parent aece13860c
commit 752fdca2d6
4 changed files with 32 additions and 32 deletions

View File

@@ -172,16 +172,16 @@ class HTS_etf(HTS):
if bs_buy_price > 1000: if bs_buy_price > 1000:
if not self.orderChecker.exist(today, "A" + self.stock_code, hours=9): #if not self.orderChecker.exist(today, "A" + self.stock_code, hours=9):
buy_count = int(MAX_PRICE / bs_buy_price) buy_count = int(MAX_PRICE / bs_buy_price)
if buy_count > 0: if buy_count > 0:
# 매수를 주문한다. # 매수를 주문한다.
orderNum = self.requestOrder(OrderType.buy, self.stock_code, buy_count, bs_buy_price) orderNum = self.requestOrder(OrderType.buy, self.stock_code, buy_count, bs_buy_price)
self.orderChecker.buy(today, "A" + self.stock_code, buy_count, bs_buy_price, orderNum) self.orderChecker.buy(today, "A" + self.stock_code, buy_count, bs_buy_price, orderNum)
# 로그 출력 # 로그 출력
print("BUY", THIS_TIME.strftime('%Y%m%d %H%M%S'), orderNum, self.stock_code, bs_buy_price, buy_count) print("BUY", THIS_TIME.strftime('%Y%m%d %H%M%S'), orderNum, self.stock_code, bs_buy_price, buy_count)
if bs_sell_price > 1000: if bs_sell_price > 1000:
check = self.sellStocks(self.stock_code, bs_sell_price) check = self.sellStocks(self.stock_code, bs_sell_price)

View File

@@ -172,16 +172,16 @@ class HTS_etf(HTS):
if bs_buy_price > 1000: if bs_buy_price > 1000:
if not self.orderChecker.exist(today, "A" + self.stock_code, hours=9): #if not self.orderChecker.exist(today, "A" + self.stock_code, hours=9):
buy_count = int(MAX_PRICE / bs_buy_price) buy_count = int(MAX_PRICE / bs_buy_price)
if buy_count > 0: if buy_count > 0:
# 매수를 주문한다. # 매수를 주문한다.
orderNum = self.requestOrder(OrderType.buy, self.stock_code, buy_count, bs_buy_price) orderNum = self.requestOrder(OrderType.buy, self.stock_code, buy_count, bs_buy_price)
self.orderChecker.buy(today, "A" + self.stock_code, buy_count, bs_buy_price, orderNum) self.orderChecker.buy(today, "A" + self.stock_code, buy_count, bs_buy_price, orderNum)
# 로그 출력 # 로그 출력
print("BUY", THIS_TIME.strftime('%Y%m%d %H%M%S'), orderNum, self.stock_code, bs_buy_price, buy_count) print("BUY", THIS_TIME.strftime('%Y%m%d %H%M%S'), orderNum, self.stock_code, bs_buy_price, buy_count)
if bs_sell_price > 1000: if bs_sell_price > 1000:
check = self.sellStocks(self.stock_code, bs_sell_price) check = self.sellStocks(self.stock_code, bs_sell_price)

View File

@@ -172,16 +172,16 @@ class HTS_etf(HTS):
if bs_buy_price > 1000: if bs_buy_price > 1000:
if not self.orderChecker.exist(today, "A" + self.stock_code, hours=9): #if not self.orderChecker.exist(today, "A" + self.stock_code, hours=9):
buy_count = int(MAX_PRICE / bs_buy_price) buy_count = int(MAX_PRICE / bs_buy_price)
if buy_count > 0: if buy_count > 0:
# 매수를 주문한다. # 매수를 주문한다.
orderNum = self.requestOrder(OrderType.buy, self.stock_code, buy_count, bs_buy_price) orderNum = self.requestOrder(OrderType.buy, self.stock_code, buy_count, bs_buy_price)
self.orderChecker.buy(today, "A" + self.stock_code, buy_count, bs_buy_price, orderNum) self.orderChecker.buy(today, "A" + self.stock_code, buy_count, bs_buy_price, orderNum)
# 로그 출력 # 로그 출력
print("BUY", THIS_TIME.strftime('%Y%m%d %H%M%S'), orderNum, self.stock_code, bs_buy_price, buy_count) print("BUY", THIS_TIME.strftime('%Y%m%d %H%M%S'), orderNum, self.stock_code, bs_buy_price, buy_count)
if bs_sell_price > 1000: if bs_sell_price > 1000:
check = self.sellStocks(self.stock_code, bs_sell_price) check = self.sellStocks(self.stock_code, bs_sell_price)

View File

@@ -173,16 +173,16 @@ class HTS_etf(HTS):
if bs_buy_price > 1000: if bs_buy_price > 1000:
if not self.orderChecker.exist(today, "A" + self.stock_code, hours=9): #if not self.orderChecker.exist(today, "A" + self.stock_code, hours=9):
buy_count = int(MAX_PRICE / bs_buy_price) buy_count = int(MAX_PRICE / bs_buy_price)
if buy_count > 0: if buy_count > 0:
# 매수를 주문한다. # 매수를 주문한다.
orderNum = self.requestOrder(OrderType.buy, self.stock_code, buy_count, bs_buy_price) orderNum = self.requestOrder(OrderType.buy, self.stock_code, buy_count, bs_buy_price)
self.orderChecker.buy(today, "A" + self.stock_code, buy_count, bs_buy_price, orderNum) self.orderChecker.buy(today, "A" + self.stock_code, buy_count, bs_buy_price, orderNum)
# 로그 출력 # 로그 출력
print("BUY", THIS_TIME.strftime('%Y%m%d %H%M%S'), orderNum, self.stock_code, bs_buy_price, buy_count) print("BUY", THIS_TIME.strftime('%Y%m%d %H%M%S'), orderNum, self.stock_code, bs_buy_price, buy_count)
if bs_sell_price > 1000: if bs_sell_price > 1000:
check = self.sellStocks(self.stock_code, bs_sell_price) check = self.sellStocks(self.stock_code, bs_sell_price)