init
This commit is contained in:
@@ -36,13 +36,13 @@ class OrderChecker:
|
||||
# 1) 종목 코드를 찾는다.
|
||||
stock_df = order_df.loc[order_df["stock_code"] == stock_code]
|
||||
|
||||
# 2) 2 시간 전 계산
|
||||
before_two_hour = datetime.now() - timedelta(hours=2)
|
||||
# 2) 1 시간 전 계산
|
||||
before_two_hour = datetime.now() - timedelta(hours=1)
|
||||
|
||||
# 3) 만약 2 시간 전 주문을 찾는다.
|
||||
# 3) 만약 1 시간 전 주문을 찾는다.
|
||||
stock_twohour_df = stock_df.loc[stock_df["datetime"] <= before_two_hour]
|
||||
|
||||
# 4) 2 시간 전 주문 중에서 매수 데이터만 찾는다.
|
||||
# 4) 1 시간 전 주문 중에서 매수 데이터만 찾는다.
|
||||
orderNum_df = stock_twohour_df.loc[stock_twohour_df["type"] == OrderType.buy.value]
|
||||
|
||||
# 5) 2시간 전 매수 항목을 별도로 추출한다.
|
||||
|
||||
Reference in New Issue
Block a user