Administrator
2023-10-17 918cf8f252cc5b959f177acdb64395e0ad67cc47
H撤异常保护
1个文件已修改
6 ■■■■■ 已修改文件
l2/cancel_buy_strategy.py 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/cancel_buy_strategy.py
@@ -564,14 +564,18 @@
    # 设置成交进度
    def set_transaction_index(self, code, index):
        try:
        if index == self.__transaction_progress_index_dict.get(code):
            return
        self.__transaction_progress_index_dict[code] = index
        if self.__need_compute_watch_indexes(code, index):
            self.__compute_watch_index(code)
        except Exception as e:
            l2_log.h_cancel_debug(code, "设置成交进度位置出错:{}", str(e))
    # 设置真实下单位置
    def set_real_place_order_index(self, code, index, buy_single_index):
        try:
        # 计算触发位置
        min_num = int(5000 / (float(gpcode_manager.get_limit_up_price(code))))
        # 统计净涨停买的数量
@@ -596,6 +600,8 @@
            # 取后1/3的数据
            temp_index = int(temp_count * 9 / 10)
            self.__start_compute_index_dict[code] = not_cancel_indexes[temp_index]
        except Exception as e:
            l2_log.h_cancel_debug(code, "设置真实下单位置出错:{}", str(e))
    def need_cancel(self, code, buy_single_index, buy_exec_index, start_index, end_index, total_data,
                    buy_volume_index, volume_index,