Administrator
2024-04-16 cd00566b9427583658550d907d12ac40dc38260f
bug修复
2个文件已修改
15 ■■■■ 已修改文件
l2/cancel_buy_strategy.py 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/l2_transaction_data_processor.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/cancel_buy_strategy.py
@@ -174,9 +174,9 @@
        # 大于10w
        if total_deal_money >= 10 * 10000:
            cancel_result = self.__need_cancel_for_slow_sell(code,total_datas)
            cancel_result = self.__need_cancel_for_slow_sell(code, total_datas)
            if cancel_result[0]:
                return True, f"S慢砸:{ cancel_result[1]}"
                return True, f"S慢砸:{cancel_result[1]}"
        if total_deal_money >= 100 * 10000:
            start_order_no = big_sell_order_info[1][-1][4][1]
@@ -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)
        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):
l2/l2_transaction_data_processor.py
@@ -113,7 +113,7 @@
                if order_begin_pos and order_begin_pos.buy_exec_index and order_begin_pos.buy_exec_index > -1:
                    cancel_result = FCancelBigNumComputer().need_cancel_for_deal_fast(code, buy_progress_index)
                    if cancel_result[0]:
                        L2TradeDataProcessor.cancel_buy(code, cancel_result[1])
                        L2TradeDataProcessor.cancel_buy(code, f"F撤:{cancel_result[1]}")
                    SCancelBigNumComputer().set_transaction_index(code, order_begin_pos.buy_single_index,
                                                                  buy_progress_index)