| | |
| | | # 最大的时间差,最大的索引差, 数据 |
| | | # 深证与执行位置相差时间>=10ms以上,上证与执行位置相差时间>=100ms以上 |
| | | data_ = temp_volumes_info_list[0][2] |
| | | MIN_SPCE_MS = 10 if tool.is_sh_code(code) else 10 |
| | | MIN_SPCE_MS = 30 if tool.is_sh_code(code) else 10 |
| | | if tool.trade_time_sub_with_ms(L2DataUtil.get_time_with_ms(data_["val"]), exec_time_with_ms) < MIN_SPCE_MS: |
| | | continue |
| | | match_list.append((max_sub_time, max_sub_index, data_)) |
| | |
| | | f"真实下单位置矫正:{code}-({real_order_index},1)") |
| | | except Exception as e: |
| | | logger_debug.exception(e) |
| | | async_log_util.error(logger_debug, f"重新寻找真实下单位异常:{code}-{order_info}") |
| | | |
| | | @classmethod |
| | | def process_add_datas(cls, code, add_datas, capture_timestamp, __start_time): |
| | |
| | | limit_up_info_map = self.__get_limit_up_info(min_day) |
| | | fdatas = [] |
| | | for b in block_codes_dict: |
| | | # if b != '机器人': |
| | | # if b != '轨道交通': |
| | | # continue |
| | | |
| | | if b in constant.KPL_INVALID_BLOCKS: |
| | |
| | | temp_codes = [x[0] for x in zylt_list] |
| | | code_info_list.sort(key=lambda x: x[1], reverse=True) |
| | | limit_up_count_max = code_info_list[:2] |
| | | rank2_codes = set() |
| | | for d in limit_up_count_max: |
| | | if d[0] not in temp_codes and d[1] >= 6: |
| | | if d[1] >= 6: |
| | | # 涨停次数大于6次 |
| | | if d[0] not in temp_codes: |
| | | zylt_list.append(d) |
| | | rank2_codes.add(d[0]) |
| | | # 按照涨停次数排序 |
| | | zylt_list.sort(key=lambda x: x[1], reverse=True) |
| | | zylt_list = [x[0] for x in zylt_list] |
| | |
| | | continue |
| | | |
| | | index += 1 |
| | | if int(float(limit_up_info_map[code][2])) < 50: |
| | | if int(float(limit_up_info_map[code][2])) < 50 and code not in rank2_codes: |
| | | continue |
| | | # [(板块, 代码名称, 代码, 涨停次数, 自由市值)] |
| | | fdatas.append( |