init
This commit is contained in:
@@ -173,16 +173,16 @@ class HTS_etf(HTS):
|
||||
|
||||
if bs_buy_price > 1000:
|
||||
|
||||
if not self.orderChecker.exist(today, "A" + self.stock_code, hours=9):
|
||||
buy_count = int(MAX_PRICE / bs_buy_price)
|
||||
#if not self.orderChecker.exist(today, "A" + self.stock_code, hours=9):
|
||||
buy_count = int(MAX_PRICE / bs_buy_price)
|
||||
|
||||
if buy_count > 0:
|
||||
# 매수를 주문한다.
|
||||
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)
|
||||
if buy_count > 0:
|
||||
# 매수를 주문한다.
|
||||
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)
|
||||
|
||||
# 로그 출력
|
||||
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:
|
||||
check = self.sellStocks(self.stock_code, bs_sell_price)
|
||||
|
||||
Reference in New Issue
Block a user