Administrator
2024-06-07 1a0be577a89727ef6b80245b6b53c8ddf43ca7d9
l2/l2_data_manager_new.py
@@ -669,7 +669,7 @@
        @param code:
        @return:
        """
        if code.find("60") == 0:
        if tool.is_sh_code(code):
            # 上证不激进下单
            return None
@@ -998,7 +998,7 @@
        total_data = local_today_datas.get(code)
        # 9:32之前上证开1的票不买
        if code.find("60") == 0 and int(total_data[-1]["val"]["time"].replace(":", "")) <= int("093200"):
        if tool.is_sh_code(code) and int(total_data[-1]["val"]["time"].replace(":", "")) <= int("093200"):
            # 获取涨停时间
            limit_up_data = kpl_data_manager.KPLLimitUpDataRecordManager.record_code_dict.get(code)
            if limit_up_data:
@@ -1057,7 +1057,7 @@
                    return False, False, f"成交位置距离当前位置纯买额({not_cancel_money})小于m值({m_base_val})"
            # 上证下单需要有成交大单(包含主动买与被动买)或者挂买的大单
            if code.find("60") == 0:
            if tool.is_sh_code(code):
                deal_big_order_count = BigOrderDealManager().get_total_buy_count(code)
                if deal_big_order_count < 1:
                    # 统计挂买大单
@@ -1757,7 +1757,7 @@
        # (time_str, round(money), volume, sell_1_info)
        refer_sell_data = cls.__L2MarketSellManager.get_refer_sell_data(code, start_time_str)
        active_buy_blocks = cls.get_active_buy_blocks(code)
        if code.find("60") == 0:
        if tool.is_sh_code(code):
            if refer_sell_data is None:
                # 设置默认卖信息
                refer_sell_data = (start_time_str, 0, 0, (round(float(total_datas[start_index]["val"]["price"]), 2), 0))
@@ -2217,12 +2217,12 @@
        trigger_buy = True
        # 间隔最大时间为3s
        max_space_time_ms = 3 * 1000
        if code.find("00") == 0 and not is_at_limit_up:
        if tool.is_sz_code(code) and not is_at_limit_up:
            # 深证非板上放量
            max_space_time_ms = 1 * 1000
        # 上证的间隔时间为1s
        if code.find("60") == 0:
        if tool.is_sh_code(code):
            max_space_time_ms = 1 * 1000
        # 不下单的信息
@@ -2319,13 +2319,13 @@
                    # 板上下单需要安全笔数3笔
                    safe_count = 3
                else:
                    if code.find("00") == 0:
                    if tool.is_sz_code(code):
                        # 深证上板
                        safe_count = 2
                    elif code.find("60") == 0:
                    elif tool.is_sh_code(code):
                        # 上证安全笔数为3
                        safe_count = 3
            if code.find("00") == 0:
            if tool.is_sz_code(code):
                money_y = code_volumn_manager.get_reference_volume_as_money_y(code)
                # 大于8亿的安全笔数必须有8笔
                if money_y >= 8: