Administrator
2024-04-16 cd00566b9427583658550d907d12ac40dc38260f
l2/cancel_buy_strategy.py
@@ -211,7 +211,7 @@
        if code not in self.__s_slow_sell_watch_indexes_dict:
            return False, "S慢砸没有囊括"
        # 下单3分钟内有效
        real_place_order_info = self.get_real_place_order_index_cache(code)
        real_place_order_info = self.__get_real_place_order_index_info_cache(code)
        if not real_place_order_info:
            return False, "没有获取到真实下单位"
        if tool.trade_time_sub(total_datas[-1]['val']['time'],
@@ -234,15 +234,14 @@
                if val['orderNo'] == watch_info[1]:
                    total_num -= watch_info[2]
        min_index = min(watch_info[0])
        sell_orders =  HuaXinSellOrderStatisticManager.get_latest_transaction_datas(code,total_datas[min_index]['val']['orderNo'])
        sell_orders = HuaXinSellOrderStatisticManager.get_latest_transaction_datas(code, total_datas[min_index]['val'][
            'orderNo'])
        sell_order_num = sum([x[1] for x in sell_orders]) // 100
        rate = round(sell_order_num/total_num,2)
        if rate > 0.49:
            return True, f"慢砸成交比例:{rate}/0.49"
        else:
            return False, f"尚未触发撤单比例:{rate}"
    # 计算S后撤监听的数据范围
    def __compute_down_cancel_watch_index(self, code, big_sell_order_info, total_datas):