init
This commit is contained in:
13
hts/HTS.py
13
hts/HTS.py
@@ -910,7 +910,7 @@ class HTS:
|
|||||||
|
|
||||||
# 매수 주문
|
# 매수 주문
|
||||||
# 현재까지 매입금액이 7백만원 이하일 때만 매수를 한다.
|
# 현재까지 매입금액이 7백만원 이하일 때만 매수를 한다.
|
||||||
if TOTAL_BUY_AMT < 7000000:
|
if TOTAL_BUY_AMT < 5000000:
|
||||||
self.requestOrder("2", stock_code, BUY_COUNT , bs_buy_price)
|
self.requestOrder("2", stock_code, BUY_COUNT , bs_buy_price)
|
||||||
|
|
||||||
## 매도 주문 (아래 잔고를 체크해서 매도를 호출하는 것으로 시도한다.)
|
## 매도 주문 (아래 잔고를 체크해서 매도를 호출하는 것으로 시도한다.)
|
||||||
@@ -962,7 +962,6 @@ if __name__ == "__main__":
|
|||||||
RESOURCE_DIR = PROJECT_HOME + "/resources/analysis/"+today.strftime("%Y%m%d")
|
RESOURCE_DIR = PROJECT_HOME + "/resources/analysis/"+today.strftime("%Y%m%d")
|
||||||
|
|
||||||
stock_codes = ["252670", "122630"]
|
stock_codes = ["252670", "122630"]
|
||||||
stock_codes = ["122630"]
|
|
||||||
given_days = ['20210901','20210902','20210903','20210906','20210907','20210908','20210909','20210910','20210913','20210914','20210915','20210916','20210917','20210923','20210924','20210927','20210928','20210929','20210930','20211001']
|
given_days = ['20210901','20210902','20210903','20210906','20210907','20210908','20210909','20210910','20210913','20210914','20210915','20210916','20210917','20210923','20210924','20210927','20210928','20210929','20210930','20211001']
|
||||||
|
|
||||||
hts = HTS()
|
hts = HTS()
|
||||||
@@ -970,12 +969,12 @@ if __name__ == "__main__":
|
|||||||
#hts.all_stocks()
|
#hts.all_stocks()
|
||||||
#hts.getChartData(stock_codes)
|
#hts.getChartData(stock_codes)
|
||||||
#hts.currentStock(stock_codes)
|
#hts.currentStock(stock_codes)
|
||||||
for given_day in given_days:
|
#for given_day in given_days:
|
||||||
#hts.writeStockData(stock_codes, given_day)
|
#hts.writeStockData(stock_codes, given_day)
|
||||||
for stock_code in stock_codes:
|
#for stock_code in stock_codes:
|
||||||
hts.simulate(stock_code, given_day)
|
#hts.simulate(stock_code, given_day)
|
||||||
|
|
||||||
#given_day = datetime.today().strftime('%Y%m%d')
|
given_day = datetime.today().strftime('%Y%m%d')
|
||||||
#hts.buyRealTime(stock_codes[0], given_day)
|
hts.buyRealTime(stock_codes[0], given_day)
|
||||||
|
|
||||||
print ("done...")
|
print ("done...")
|
||||||
|
|||||||
Reference in New Issue
Block a user