init
This commit is contained in:
@@ -81,6 +81,16 @@ class HTS_252670 (HTS):
|
||||
# 규칙 기반의 분석을 통해서 볼린저밴드 상/하단을 계산한다.
|
||||
data = self.buySellChecker.analyze(result)
|
||||
|
||||
# 만약 미체결 내역이 있는데, 지표가 꺽여 내려온다면, 매수 주문을 취소 시킨다.
|
||||
last_index = len(data['close']) - 1
|
||||
if data['slow_k'][last_index-1]>=80 and data['slow_k'][last_index-1] > data['slow_k'][last_index]:
|
||||
# 미체결 기록을 가져온다.
|
||||
ORDER_LIST = self.requestOrderList()
|
||||
orderListToCancel = self.orderChecker.remove(self.stock_code, OrderType.sell, ORDER_LIST)
|
||||
self.cancelOrderList(orderListToCancel)
|
||||
print("CANCEL", THIS_TIME.strftime('%Y%m%d %H%M%S'), len(orderListToCancel), len(ORDER_LIST))
|
||||
|
||||
|
||||
# 사야 할 시점/가격과 팔아야 할 시점/가격을 체크한다.
|
||||
bsLine, data = self.buySellChecker.checkTransaction(data, self.stock_code, isRealTime=True)
|
||||
bs_buy_price = bsLine['buy'][0]
|
||||
|
||||
Reference in New Issue
Block a user