Administrator
2024-04-10 9a8a924d75fd4e29c4c14c86c041c00ba89f615a
l2/l2_data_manager_new.py
@@ -458,7 +458,8 @@
                    cls.__process_order(code, start_index, end_index, capture_timestamp, is_first_code)
                else:
                    # 未挂单,时间相差不大才能挂单
                    # if tool.trade_time_sub(latest_time, "09:32:00") < 0 or l2.l2_data_util.L2DataUtil.is_same_time(now_time_str, latest_time):
                    if tool.trade_time_sub(latest_time, "09:32:00") < 0 or l2.l2_data_util.L2DataUtil.is_same_time(
                            now_time_str, latest_time):
                    cls.__process_not_order(code, start_index, end_index, capture_timestamp, is_first_code)
            l2_log.info(code, logger_l2_process, "code:{} 处理数据范围: {}-{} 处理时间:{} 线程ID:{}", code,
                        add_datas[0]["index"],
@@ -1305,6 +1306,9 @@
            # ------------------------------确定信号种类----------------------------------
            # 第一步:获取激进下单信号
            continue_count = cls.__l2PlaceOrderParamsManagerDict[code].get_begin_continue_buy_count()
            # if code.find('60') == 0:
            # 激进买
            continue_count = 1
            has_single, _index, sell_info = cls.__compute_active_order_begin_pos(code, continue_count, max(
                (compute_start_index - continue_count - 1) if new_add else compute_start_index, 0), compute_end_index)
            fast_msg = None
@@ -1651,9 +1655,13 @@
            # 有可买板块,有激进买板块
            # 第一步: 计算总卖额
            threshold_money, sell_1_price = refer_sell_data[1], refer_sell_data[3][0]
            if code.find("60") == 0:
                threshold_money = 0
            else:
            for i in range(start_index - 1, -1, -1):
                val = total_datas[i]["val"]
                if tool.compare_time(val["time"], refer_sell_data[0]) <= 0:
                    if tool.compare_time(val["time"], refer_sell_data[0]) < 0:
                        # 将本s的计算上去
                    break
                if L2DataUtil.is_sell(val):
                    threshold_money += val["num"] * int(float(val["price"]) * 100)