| | |
| | | UPDATE_DATA_TIME = datetime.time(18, 31, 00).strftime("%H:%M:%S") # 定义更新数据时间 |
| | | PROGRAM_SLEEP_TIME = datetime.time(23, 00, 00).strftime("%H:%M:%S") # 定义程序休眠时间 |
| | | |
| | | # 读取已经获取到并存储在本地的目标范围的个股的板块概念 |
| | | # 读取JSON文件并解析为字典 |
| | | if os.path.exists(constant.ALL_STOCKS_PLATE_PATH): |
| | | with open(constant.ALL_STOCKS_PLATE_PATH, 'r', |
| | | encoding='utf-8') as f: |
| | | json_data = f.read() |
| | | else: |
| | | json_data = "{}" |
| | | all_stocks_plate_dict = json.loads(json_data) |
| | | logger.info(f"all_stocks_plate_dict的数量={len(all_stocks_plate_dict)}") |
| | | # todo 2025-03-25 后无BUG即可彻底删除下处注释部分 |
| | | # # 读取已经获取到并存储在本地的目标范围的个股的板块概念 |
| | | # # 读取JSON文件并解析为字典 |
| | | # if os.path.exists(constant.ALL_STOCKS_PLATE_PATH): |
| | | # with open(constant.ALL_STOCKS_PLATE_PATH, 'r', |
| | | # encoding='utf-8') as f: |
| | | # json_data = f.read() |
| | | # else: |
| | | # json_data = "{}" |
| | | # all_stocks_plate_dict = json.loads(json_data) |
| | | # logger.info(f"all_stocks_plate_dict的数量={len(all_stocks_plate_dict)}") |
| | | |
| | | # 初始化当日当时最高价 |
| | | high_price = 0 |
| | |
| | | # 初始化实时大盘行情情绪综合强度分时列表 |
| | | time_sharing_market_strong_dirt = {} |
| | | |
| | | # 为K线属性指标字典初始化 |
| | | # 为所有个股的带属性K线 字典初始化 |
| | | all_stocks_all_K_line_property_dict = {} |
| | | # 为指数的带属性K线 字典初始化 |
| | | all_index_k_line_property_dict = {} |
| | | # 声明K线属性中所有涨停类型 |
| | | limit_up_type = ['one_line_limit_up', 'limit_down_then_limit_up', 'limit_up_then_limit_down_then_limit_up', |
| | | 'limit_up'] |
| | |
| | | # 声明K线属性中所有炸板类型 |
| | | frying_plate_type = ['frying_plate', 'first_frying_plate', 'one_line_limit_up_then_frying_plate', |
| | | 'one_line_limit_up_then_frying_plate_then_limit_down', 'not_first_frying_plate'] |
| | | |
| | | # 定义一个当日分时内所有个股的开盘价字典 |
| | | all_stocks_current_open = {} |
| | | # 定义一个当日分时内所有个股的实时最高价和最低价字典 |