Administrator
2023-09-01 3c36073fa926e9fb2571baaac77012cb4a32ef3f
l2/l2_data_manager_new.py
@@ -286,6 +286,11 @@
            if code in cls.unreal_buy_dict:
                cls.unreal_buy_dict.pop(code)
    @classmethod
    def set_real_place_order_index(cls, code, index):
        cls.__DCancelBigNumComputer.set_real_order_index(code, index)
        cls.__SecondCancelBigNumComputer.set_real_place_order_index(code, index)
    # 处理华鑫L2数据
    @classmethod
    def process_huaxin(cls, code, origin_datas):
@@ -310,8 +315,7 @@
            # 获取下单位置
            place_order_index = huaxin_delegate_postion_manager.get_l2_place_order_position(code, datas)
            if place_order_index:
                cls.__DCancelBigNumComputer.set_real_order_index(code, place_order_index)
                cls.__SecondCancelBigNumComputer.set_real_place_order_index(code, place_order_index)
                cls.set_real_place_order_index(code, place_order_index)
                async_log_util.info(logger_l2_process, "code:{} 获取到下单真实位置:{}", code, place_order_index)
            __start_time = round(t.time() * 1000)
            if len(datas) > 0:
@@ -1022,12 +1026,13 @@
        # 买入纯买额统计
        new_buy_exec_index, buy_nums, buy_count, rebegin_buy_pos, max_num_set_new = cls.__sum_buy_num_for_order_3(code,
                                                                                                             start_process_index,
                                                                                                             compute_end_index,
                                                                                                             num, count,
                                                                                                             threshold_money,
                                                                                                             buy_single_index,
                                                                                                             max_num_set)
                                                                                                                  start_process_index,
                                                                                                                  compute_end_index,
                                                                                                                  num,
                                                                                                                  count,
                                                                                                                  threshold_money,
                                                                                                                  buy_single_index,
                                                                                                                  max_num_set)
        # _start_time = l2_data_log.l2_time(code, tool.get_now_timestamp() - _start_time, "纯买额统计时间")
        l2_log.debug(code, "m值-{} 量比:{} rebegin_buy_pos:{}", threshold_money, cls.volume_rate_info[code][0],
@@ -1056,9 +1061,11 @@
            # 数据是否处理完毕
            if new_buy_exec_index < compute_end_index:
                if ordered:
                    cls.__process_order(code, new_buy_exec_index + 1, compute_end_index, capture_time, is_first_code, False)
                    cls.__process_order(code, new_buy_exec_index + 1, compute_end_index, capture_time, is_first_code,
                                        False)
                else:
                    cls.__start_compute_buy(code, new_buy_exec_index + 1, compute_end_index, threshold_money, capture_time,
                    cls.__start_compute_buy(code, new_buy_exec_index + 1, compute_end_index, threshold_money,
                                            capture_time,
                                            is_first_code, False)
        else:
            # 未达到下单条件,保存纯买额,设置纯买额