Administrator
2024-03-08 7745dedc6dd22b80ad17e5b7c1490ef5ece3d1f5
bug修复
3个文件已修改
19 ■■■■ 已修改文件
l2/cancel_buy_strategy.py 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/l2_transaction_data_processor.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
utils/tool.py 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/cancel_buy_strategy.py
@@ -1013,6 +1013,11 @@
        try:
            l2_log.l_cancel_debug(code, f"计算L后囊括范围:{start_index}-{end_index}")
            total_datas = local_today_datas.get(code)
            if re_compute > 0 and tool.trade_time_sub(total_datas[-1]["val"]["time"],
                                                      total_datas[buy_single_index]["val"]["time"]) < 2 * 60:
                # 间隔超过2分钟才能重新计算
                l2_log.l_cancel_debug(code, f"要间隔2分钟过后才能重新计算")
                return
            if total_datas:
                # 计算的上截至位距离下截至位纯买额要小于2.5倍m值
                # thresh_hold_money = l2_trade_factor.L2PlaceOrderParamsManager.get_base_m_val(code)
@@ -1679,8 +1684,8 @@
        # 统计未撤订单的数量与金额
        total_datas = local_today_datas.get(code)
        # 是否是下单5分钟内
        if tool.trade_time_sub(tool.get_now_time_str(), total_datas[real_order_index]['val']['time']) > 1 * 60:
            return False, "下单超过1分钟"
        if tool.trade_time_sub(tool.get_now_time_str(), total_datas[real_order_index]['val']['time']) > 30:
            return False, "下单超过30s"
        total_left_count = 0
        total_left_num = 0
l2/l2_transaction_data_processor.py
@@ -111,7 +111,7 @@
                                                                     buy_progress_index)
                    cresult = FCancelBigNumComputer().need_cancel_for_deal_fast(code,buy_progress_index)
                    if cresult[0] and not DCancelBigNumComputer().has_auto_cancel_rules(code):
                        L2TradeDataProcessor.cancel_buy(code, f"下单5分钟内排单不足:{cresult[1]}")
                        L2TradeDataProcessor.cancel_buy(code, f"下单30s内排单不足:{cresult[1]}")
                    # ---------------------------------判断板块是否跟上来了-------------------------------
                    try:
                        pass
utils/tool.py
@@ -236,12 +236,8 @@
if __name__ == "__main__":
    print(get_shadow_price(20))
    print(get_shadow_price(20))
    print(get_shadow_price(20))
    # print(trade_time_sub("11:29:59", 5))
    # print(trade_time_sub("10:29:59", 10))
    # print(trade_time_add_second("13:29:59", 60))
    print(trade_time_sub("13:00:01",
                         "11:29:55"))
class CodeDataCacheUtil: