Administrator
2024-04-03 f2f2c572ec9440c30448287b326ac565cde62fb7
bug修改
2个文件已修改
16 ■■■■■ 已修改文件
l2/l2_data_manager_new.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/l2_transaction_data_manager.py 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/l2_data_manager_new.py
@@ -2131,10 +2131,10 @@
            # 计算信号位置之后的主动卖,加入到阈值之中
            sell_orders = HuaXinSellOrderStatisticManager.get_latest_transaction_datas(code, min_sell_order_no=int(
                total_datas[buy_single_index]['val']['orderNo']))
                total_datas[buy_single_index]['val']['orderNo']), min_deal_time = tool.trade_time_sub(total_datas[buy_single_index]['val']['time'],1))
            sell_order_num = sum([x[1] for x in sell_orders]) // 100
            # 纯买额足够,且笔数大于2笔
            if buy_nums < threshold_num:
            if buy_nums < threshold_num + sell_order_num:
                l2_log.buy_debug(code, f"激进买主动卖手数:{sell_order_num}")
                not_buy_msg = f"【{i}】纯买额不够,{buy_nums}/{threshold_num}"
                continue
l2/l2_transaction_data_manager.py
@@ -150,7 +150,6 @@
                    # 封存数据,计算新起点
                    # 大于50w的卖单才会保存
                    # 大于50w加入卖单
                    cls.__latest_all_sell_orders_dict[code].append(info)
                    money = info[1] * info[2]
                    if money >= 500000:
                        if is_active_sell(info[0]):
@@ -214,17 +213,20 @@
    # 获取最近成交数据
    @classmethod
    def get_latest_transaction_datas(cls, code, min_sell_order_no=None):
    def get_latest_transaction_datas(cls, code, min_sell_order_no=None, min_deal_time=None):
        total_orders = []
        sell_orders = cls.__latest_all_sell_orders_dict.get(code)
        if sell_orders:
            for i in range(len(sell_orders) - 1, -1, -1):
                if min_sell_order_no and min_sell_order_no > sell_orders[i][0]:
                if min_deal_time and tool.trade_time_sub(min_deal_time,
                                                         l2_huaxin_util.convert_time(sell_orders[i][3][0])) > 0:
                    break
                if min_sell_order_no and min_sell_order_no > sell_orders[i][0]:
                    continue
                total_orders.append(sell_orders[i])
            total_orders.extend(sell_orders)
        if code in cls.__latest_sell_order_dict:
            if min_sell_order_no :
            if min_sell_order_no:
                if cls.__latest_sell_order_dict[code][0] >= min_sell_order_no:
                    total_orders.append(cls.__latest_sell_order_dict[code])
            else: