diff --git a/HTS_etf.py b/HTS_etf.py index a3c91a1..a1c5311 100644 --- a/HTS_etf.py +++ b/HTS_etf.py @@ -412,7 +412,10 @@ class HTS_etf(HTS): #self.orderChecker = OrderChecker(self.RESOURCE_PATH, stock_code) BUY_LIST = { - 'stock_code': {'buy_count': 0, 'buy_avg': 0, 'buy_list': []} + '122630': {'buy_count': 0, 'buy_avg': 0, 'buy_list': []}, + '233740': {'buy_count': 0, 'buy_avg': 0, 'buy_list': []}, + '251340': {'buy_count': 0, 'buy_avg': 0, 'buy_list': []}, + '252670': {'buy_count': 0, 'buy_avg': 0, 'buy_list': []} } print("START...") @@ -440,9 +443,9 @@ class HTS_etf(HTS): if isFirst < 4: if 0 < buy_avg: - BUY_LIST[stock_code]['buy_avg'] = buy_avg - if BUY_LIST is not None and len(BUY_LIST[stock_code]['buy_list']) == 0: - BUY_LIST[stock_code]['buy_list'].append({'buy_ymd': datetime.now(), 'buy_price': buy_avg, 'buy_count': 0, 'buy_cut': 0, 'buy_type': ''}) + BUY_LIST[stock_code]['buy_avg'] = buy_avg + if BUY_LIST is not None and len(BUY_LIST[stock_code]['buy_list']) == 0: + BUY_LIST[stock_code]['buy_list'].append({'buy_ymd': datetime.now(), 'buy_price': buy_avg, 'buy_count': 0, 'buy_cut': 0, 'buy_type': ''}) self.bot.sendMsg("START... {} ({}) MAX_PRICE: {}".format(stock_code, stock_name, MAX_PRICE)) isFirst += 1