init
This commit is contained in:
@@ -120,7 +120,7 @@ class HTS_DAILY (HTS):
|
|||||||
bsLine, data = self.buySellChecker.checkTransactionWithEnvelope(data, stock_code, self.analyzed_day, isRealTime=False)
|
bsLine, data = self.buySellChecker.checkTransactionWithEnvelope(data, stock_code, self.analyzed_day, isRealTime=False)
|
||||||
|
|
||||||
# 다음 조건이면 매수한다.
|
# 다음 조건이면 매수한다.
|
||||||
if len(data.index) > 10 and max(bsLine['buy'][len(bsLine['buy']) - 2:]) > 1000 and not self.orderChecker.exist(stock_code):
|
if len(data.index) > 10 and max(bsLine['buy'][len(bsLine['buy']) - 1:]) > 1000 and not self.orderChecker.exist(stock_code):
|
||||||
last_index = len(bsLine['buy'])-1
|
last_index = len(bsLine['buy'])-1
|
||||||
if bsLine['buy'][last_index] > 0:
|
if bsLine['buy'][last_index] > 0:
|
||||||
bs_buy_price = bsLine['buy'][last_index]
|
bs_buy_price = bsLine['buy'][last_index]
|
||||||
@@ -134,8 +134,9 @@ class HTS_DAILY (HTS):
|
|||||||
# 로그 출력
|
# 로그 출력
|
||||||
print("BUY", THIS_TIME.strftime('%Y%m%d %H%M%S'), orderNum, stock_code, stock_name, bs_buy_price, buy_count)
|
print("BUY", THIS_TIME.strftime('%Y%m%d %H%M%S'), orderNum, stock_code, stock_name, bs_buy_price, buy_count)
|
||||||
|
|
||||||
|
"""
|
||||||
# 다음 조건이면 매도한다.
|
# 다음 조건이면 매도한다.
|
||||||
if len(data.index) > 10 and max(bsLine['sell'][len(bsLine['sell']) - 2:]) > 0:
|
if len(data.index) > 10 and max(bsLine['sell'][len(bsLine['sell']) - 1:]) > 0:
|
||||||
last_index = len(bsLine['sell']) - 1
|
last_index = len(bsLine['sell']) - 1
|
||||||
if bsLine['sell'][last_index] > 0:
|
if bsLine['sell'][last_index] > 0:
|
||||||
bs_sell_price = bsLine['sell'][last_index]
|
bs_sell_price = bsLine['sell'][last_index]
|
||||||
@@ -144,7 +145,7 @@ class HTS_DAILY (HTS):
|
|||||||
|
|
||||||
# 로그 출력
|
# 로그 출력
|
||||||
print("SELL", THIS_TIME.strftime('%Y%m%d %H%M%S'), orderNum, stock_code, stock_name, bs_sell_price)
|
print("SELL", THIS_TIME.strftime('%Y%m%d %H%M%S'), orderNum, stock_code, stock_name, bs_sell_price)
|
||||||
|
"""
|
||||||
THIS_TIME = datetime.now()
|
THIS_TIME = datetime.now()
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user