Administrator
4 天以前 a58fe22470854de1d41900fcd114d0206b6366bc
D撤修改
1个文件已修改
19 ■■■■ 已修改文件
cancel_strategy/s_l_h_cancel_strategy.py 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
cancel_strategy/s_l_h_cancel_strategy.py
@@ -1675,7 +1675,8 @@
        for wi in watch_indexes:
            data = total_data[wi]
            val = data["val"]
            cancel_data = L2DataComputeUtil.is_canceled(code, wi, total_data, canceled_buyno_map, dealing_info[0] if dealing_info else None,
            cancel_data = L2DataComputeUtil.is_canceled(code, wi, total_data, canceled_buyno_map,
                                                        dealing_info[0] if dealing_info else None,
                                                        deal_order_nos)
            if str(wi) in after_place_order_index_dict:
                # 真实下单位置之后的按照权重比例来计算
@@ -1811,7 +1812,8 @@
            dealing_info = HuaXinBuyOrderManager.get_dealing_order_info(code)
            for wi in watch_indexes:
                cancel_data = L2DataComputeUtil.is_canceled(code, wi, total_data, canceled_buyno_map, dealing_info[0] if dealing_info else None,
                cancel_data = L2DataComputeUtil.is_canceled(code, wi, total_data, canceled_buyno_map,
                                                            dealing_info[0] if dealing_info else None,
                                                            deal_order_nos)
                if cancel_data:
                    if str(wi) in after_place_order_index_dict:
@@ -1969,7 +1971,7 @@
        @return: 是否可撤单, 撤单数据
        """
        if not deal_order_list:
            return False,''
            return False, ''
        # 添加成交量
        if code not in self.__total_big_sell_order_list_cache:
            self.__total_big_sell_order_list_cache[code] = []
@@ -2886,7 +2888,6 @@
        self.__compute_watch_index(code, buy_single_index)
# ---------------------------------D撤-------------------------------
# 计算 成交位->真实下单位置 总共还剩下多少手没有撤单
# 成交位变化之后重新计算
@@ -2918,8 +2919,8 @@
            return False, "非涨停价"
        # 是否小于3000w
        if buy1_info[0] * buy1_info[1] > 3000e4:
            return False, "封单额大于3000w"
        if buy1_info[0] * buy1_info[1] > 4000e4:
            return False, "封单额大于4000w"
        # 获取下单时间
        place_order_index = SCancelBigNumComputer().get_real_place_order_index_cache(code)
@@ -2935,10 +2936,10 @@
        volume_rate = code_volumn_manager.CodeVolumeManager().get_volume_rate(code)
        if volume_rate <= 0.4 and tool.trade_time_sub(time_str, total_datas[place_order_index]['val']['time']) <= 6:
            return True, f"量比({volume_rate})<=40%且在挂单6s内,封单额≤3000万"
            return True, f"量比({volume_rate})<=40%且在挂单6s内,封单额≤4000万"
        if 6 < tool.trade_time_sub(time_str, total_datas[place_order_index]['val']['time']) <= 10*60:
            return True, f"下单后10分钟内,封单额≤3000万"
        if 6 < tool.trade_time_sub(time_str, total_datas[place_order_index]['val']['time']):
            return True, f"下单后6s,封单额≤4000万"
        return False, '无撤单条件'