Administrator
2024-04-22 b7549def5867c6aba6231ea74359cfe84990ee25
bug修复
2个文件已修改
15 ■■■■■ 已修改文件
l2/cancel_buy_strategy.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
output/code_info_output.py 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/cancel_buy_strategy.py
@@ -199,7 +199,8 @@
            if code in self.__recompute_l_down_time_dict and tool.trade_time_sub_with_ms(latest_deal_time_ms,
                                                                                         self.__recompute_l_down_time_dict[
                                                                                             code]) < 1000:
                l2_log.s_cancel_debug(code, f"更新L后囊括:更新间隔在1s内,{latest_deal_time_ms}-{self.__recompute_l_down_time_dict[code]}")
                l2_log.s_cancel_debug(code,
                                      f"更新L后囊括:更新间隔在1s内,{latest_deal_time_ms}-{self.__recompute_l_down_time_dict[code]}")
                return False, ""
            self.__recompute_l_down_time_dict[code] = latest_deal_time_ms
            # 重新囊括L后
@@ -1733,7 +1734,7 @@
                if dealing_info and str(dealing_info[0]) == str(val["orderNo"]):
                    total_left_num -= dealing_info[1] // 100
        limit_up_price = gpcode_manager.get_limit_up_price(code)
        if total_left_count<=1 or (total_left_count <= THRESHOLD_COUNT and limit_up_price and total_left_num * float(
        if total_left_count <= 1 or (total_left_count <= THRESHOLD_COUNT and limit_up_price and total_left_num * float(
                limit_up_price) < 300 * 100):
            return True, f"剩余笔数({total_left_count})/金额({round(total_left_num * float(limit_up_price) * 100)})不足,成交进度:{trade_index},真实下单位置:{real_order_index}"
        return False, f"不满足撤单条件: 成交进度-{trade_index} 真实下单位置-{real_order_index} total_left_count-{total_left_count} total_left_num-{total_left_num}"
output/code_info_output.py
@@ -409,13 +409,15 @@
                                                     f"独苗",
                                                     None))
                    extra_datas = []
                    if data['big_num_indexes']:
                    if data.get('big_num_indexes'):
                        big_num_desc = []
                        for i in data['big_num_indexes']:
                            big_num_desc.append(format_l2_data(total_datas[i]))
                        extra_datas.append(f"包含大单:{' & '.join(big_num_desc)}")
                    extra_datas.append(f"M值:{money_desc(data['m_val'])}")
                    extra_datas.append(f"安全笔数:{data['safe_count']}")
                    if data.get('m_val'):
                        extra_datas.append(f"M值:{money_desc(data['m_val'])}")
                    if data.get('safe_count'):
                        extra_datas.append(f"安全笔数:{data['safe_count']}")
                    extra_datas.append(f"总卖额:{data.get('sell_info')}")
                    records_new_data.append((time_, "", "-------------------------", []))
@@ -513,7 +515,7 @@
if __name__ == '__main__':
    code = '600713'
    code = '603838'
    l2_data_util.load_l2_data(code)
    fresults = load_trade_record(code, l2_data_util.local_today_datas.get(code))
    print(fresults)