Administrator
2025-04-24 231df152a3e4dab518d48395df67771c2c7c88d8
去除部分日志/累计大单够了以后每次上板大单要求改为原有数值
4个文件已修改
23 ■■■■ 已修改文件
code_attribute/code_nature_analyse.py 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
huaxin_client/l2_data_manager.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/l2_data_manager_new.py 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
servers/huaxin_trade_server.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
code_attribute/code_nature_analyse.py
@@ -404,7 +404,7 @@
    # if max_price > float(limit_up_price):
    #     return False
    rate = (float(limit_up_price) - min_price_info[1]["close"]) / min_price_info[1]["close"]
    THRESHOLD_RATE = 0.319*2 if tool.is_ge_code(code) else 0.319
    THRESHOLD_RATE = 0.319 * 2 if tool.is_ge_code(code) else 0.319
    if rate >= THRESHOLD_RATE:
        return True, rate
    return False, rate
@@ -560,8 +560,9 @@
    items = datas[0 - day_count:]
    for item in items:
        limit_up_price = float(gpcode_manager.get_limit_up_price_by_preprice(code, item["pre_close"]))
        if abs(limit_up_price - item["high"]) < 0.001:
            # 炸板 # 或涨停
        limit_down_price = float(gpcode_manager.get_limit_down_price_by_preprice(code, item["pre_close"]))
        if abs(limit_up_price - item["high"]) < 0.001 or abs(limit_down_price - item["close"]):
            # 炸板 # 或涨停 # 或者跌停
            return True
    return False
@@ -592,8 +593,8 @@
    for item in items:
        # 是否有跌停
        # 获取当日涨幅
        rate = (item["close"] - item["pre_close"])/item["pre_close"]
        threshold_rate_ = round(0 - ((1 - tool.get_limit_down_rate(code))*0.9), 2)
        rate = (item["close"] - item["pre_close"]) / item["pre_close"]
        threshold_rate_ = round(0 - ((1 - tool.get_limit_down_rate(code)) * 0.9), 2)
        if rate < threshold_rate_:
            return True
    return False
huaxin_client/l2_data_manager.py
@@ -219,7 +219,7 @@
                    if filter_condition:
                        huaxin_l2_log.info(logger_local_huaxin_l2_orderdetail,
                                           f"{[(x[0], x[1], x[2], x[4], x[8]) for x in temp_list if x[2] >= filter_condition[0][0]]}")
                    temp_list = []
                    temp_list.clear()
                else:
                    if code not in self.temp_order_queue_dict:
                        self.l2_order_codes.discard(code)
l2/l2_data_manager_new.py
@@ -395,7 +395,7 @@
        finally:
            if datas:
                l2.l2_data_util.save_l2_data(code, None, datas)
            origin_datas.clear()
            # origin_datas.clear()
    @classmethod
    def __recompute_real_order_index(cls, code, pre_real_order_index, order_info, compute_type):
@@ -1974,8 +1974,8 @@
                    # 非上证的票看50w
                    min_num = int(5000 / limit_up_price)
            # 如果累计大单成交足够,只需看50w
            if big_order_deal_enough_result[4]:
                min_num = int(5000 / limit_up_price)
            # if big_order_deal_enough_result[4]:
            #     min_num = int(5000 / limit_up_price)
            # 需要监听的大单
            watch_indexes = set()
            # 总委托大单金额
servers/huaxin_trade_server.py
@@ -419,8 +419,8 @@
        thread_id = random.randint(0, 100000)
        l2_log.threadIds[code] = thread_id
        l2_data_count = len(_datas)
        l2_log.info(code, hx_logger_l2_orderdetail,
                    f"{code}#耗时:{use_time}-{thread_id}#数量:{l2_data_count}#{_datas[-1]}")
        # l2_log.info(code, hx_logger_l2_orderdetail,
        #             f"{code}#耗时:{use_time}-{thread_id}#数量:{l2_data_count}#{_datas[-1]}")
        # l2_data_log.l2_time_log(code, "开始处理L2逐笔委托")
        try: