This commit is contained in:
dsyoon
2023-01-25 00:29:25 +09:00
parent 00731aaad9
commit bc5bf369f8
2 changed files with 73 additions and 55 deletions

View File

@@ -29,7 +29,7 @@ class HTS_DAILY (HTS):
self.orderChecker = OrderChecker(self.RESOURCE_PATH)
self.analyzed_day = 120
self.MAX_BUY_PRICE = 200000
self.MAX_BUY_PRICE = 50000
return
def getSellingPrice(self, log_time, stock_code, final_price, check=False):
@@ -125,7 +125,7 @@ class HTS_DAILY (HTS):
if bsLine['buy'][last_index] > 0:
bs_buy_price = bsLine['buy'][last_index]
bs_buy_weight = bsLine['buy_weight'][last_index]
buy_count = int(self.MAX_BUY_PRICE / bs_buy_price)
buy_count = int((self.MAX_BUY_PRICE*bs_buy_weight) / bs_buy_price)
# 매수를 주문한다.
orderNum = self.requestOrder(OrderType.buy, stock_code, buy_count, bs_buy_price)