diff --git a/HTS_etf_122630.py b/HTS_etf_122630.py index 797123e..e2eaab8 100644 --- a/HTS_etf_122630.py +++ b/HTS_etf_122630.py @@ -172,16 +172,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) diff --git a/HTS_etf_233740.py b/HTS_etf_233740.py index ea335d9..1fa23c6 100644 --- a/HTS_etf_233740.py +++ b/HTS_etf_233740.py @@ -172,16 +172,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) diff --git a/HTS_etf_251340.py b/HTS_etf_251340.py index cb02bcc..56ed484 100644 --- a/HTS_etf_251340.py +++ b/HTS_etf_251340.py @@ -172,16 +172,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) diff --git a/HTS_etf_252670.py b/HTS_etf_252670.py index 925d9b8..99f6bcd 100644 --- a/HTS_etf_252670.py +++ b/HTS_etf_252670.py @@ -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)