Administrator
2023-12-15 9b2a4a0d84e2cea1fdf0ad892379b9eb681148cb
强势板块重新定义/输出L2数据修改
2个文件已修改
23 ■■■■ 已修改文件
third_data/code_plate_key_manager.py 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/data_export_util.py 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
third_data/code_plate_key_manager.py
@@ -525,6 +525,11 @@
                        is_strong_block = True
                        break
        if not is_strong_block:
            temp_block_codes = set(copy.deepcopy(block_codes))
            temp_block_codes.discard(code)
            if len(temp_block_codes) >= 3:
                is_strong_block = True
        max_rank = 2
        #  强势板块买老四
        if is_strong_block:
@@ -551,8 +556,10 @@
                                                                                                code_limit_up_reason_dict,
                                                                                                yesterday_current_limit_up_codes,
                                                                                                exclude_first_codes,
                                                                                                len(current_open_limit_up_codes),
                                                                                                shsz=True, limit_up_time=first_limit_up_time)
                                                                                                len(
                                                                                                    current_open_limit_up_codes),
                                                                                                shsz=True,
                                                                                                limit_up_time=first_limit_up_time)
        # record_shsz_rank, record_shsz_rank_codes = kpl_block_util.get_code_record_rank(code, block,
        #                                                                                limit_up_record_datas,
        #                                                                                code_limit_up_reason_dict,
@@ -565,6 +572,11 @@
        if current_shsz_rank < len(current_open_limit_up_codes) + max_rank:
            return True, False, f"【{block}】前排代码:{current_shsz_rank}", is_strong_block
        else:
            # 看自由流通市值是否小于20亿
            if is_strong_block:
                zyltgb = global_util.zyltgb_map.get(code)
                if zyltgb and zyltgb < 20 * 100000000:
                    return True, False, f"【{block}】涨停数量({len(block_codes)})>=4 自由流通市值({zyltgb})小于20亿", is_strong_block
            return False, False, f"【{block}】前排代码:{front_current_shsz_rank_codes} 超过{len(current_open_limit_up_codes) + max_rank}个", is_strong_block
        # 过时的代码
utils/data_export_util.py
@@ -148,7 +148,12 @@
            # 买
            if cancel_data:
                try:
                    cancel_info = "{}-{}".format(cancel_data["index"],f"{cancel_data['val']['time']}") + (f".{cancel_data['val']['tms']}" if "tms" in cancel_data["val"] else '')
                    left_num = data["val"]["num"] - cancel_data["val"]["num"]
                    if left_num > 0:
                        cancel_info = f"{left_num}手未撤:{cancel_data['index']}"
                    else:
                        cancel_info = "{}-{}".format(cancel_data["index"], f"{cancel_data['val']['time']}") + (
                            f".{cancel_data['val']['tms']}" if "tms" in cancel_data["val"] else '')
                except Exception as e:
                    logging.exception(e)
            else: