This commit is contained in:
dsyoon
2023-01-26 23:31:07 +09:00
parent a658f3f26f
commit 6657e8e773
2 changed files with 3 additions and 3 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 = 50000
self.MAX_BUY_PRICE = 30000
return
def getSellingPrice(self, log_time, stock_code, final_price, check=False):
@@ -120,7 +120,7 @@ class HTS_DAILY (HTS):
# 다음 조건이면 매수한다.
if len(data.index) > 10 and max(bsLine['buy'][len(bsLine['buy']) - 1:]) > 1000:
if not self.orderChecker.exist(today, stock_code):
if not self.orderChecker.exist(today, stock_code, hours=4):
last_index = len(bsLine['buy'])-1
if bsLine['buy'][last_index] > 0:
bs_buy_price = bsLine['buy'][last_index]

View File

@@ -26,7 +26,7 @@ class OrderChecker:
order_df['datetime'] = pd.to_datetime(order_df['datetime'])
return order_df
def exist(self, ymd, stock_code, hours=3):
def exist(self, ymd, stock_code, hours=4):
order_df = self.read(ymd)
try:
tmp = order_df.loc[order_df["stock_code"] == int(stock_code)]