Administrator
2024-05-27 40074d68d34bc222a6b8b8fce9a7cca0fc8044c1
bug修复
3个文件已修改
20 ■■■■■ 已修改文件
cancel_strategy/s_l_h_cancel_strategy.py 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/l2_data_manager_new.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
third_data/data_server.py 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
cancel_strategy/s_l_h_cancel_strategy.py
@@ -292,7 +292,8 @@
        total_datas[real_place_order_info[0]]['val']['orderNo'], min_sell_money=min_sell_money)
        sell_order_num = sum([x[1] for x in sell_orders]) // 100
        rate = round(sell_order_num / total_num, 2)
        threshold_rate,threshold_rate_msg = SCancelRateManager.get_threshhold_rate(code, SCancelRateManager.TYPE_S_SLOW)
        threshold_rate, threshold_rate_msg = SCancelRateManager.get_threshhold_rate(code,
                                                                                    SCancelRateManager.TYPE_S_SLOW)
        if rate > threshold_rate:
            return True, f"慢砸成交比例:{rate}/0.49({threshold_rate_msg})  成交:{sell_order_num}/{total_num}"
        else:
@@ -380,7 +381,8 @@
                    if total_num == 0:
                        total_num = 1
                    threshold_rate,threshold_rate_msg  = SCancelRateManager.get_threshhold_rate(code, SCancelRateManager.TYPE_S_FAST_BIG)
                    threshold_rate, threshold_rate_msg = SCancelRateManager.get_threshhold_rate(code,
                                                                                                SCancelRateManager.TYPE_S_FAST_BIG)
                    if total_deal_money / (total_num * limit_up_price * 100) >= threshold_rate:
                        # 大单成交额占总剩余总囊括的30%
@@ -441,7 +443,8 @@
            # 防止分母为0
            total_fast_money = 1
        rate = round(total_deal_money / total_fast_money, 2)
        threshold_rate,threshold_rate_msg = SCancelRateManager.get_threshhold_rate(code, SCancelRateManager.TYPE_S_FAST)
        threshold_rate, threshold_rate_msg = SCancelRateManager.get_threshhold_rate(code,
                                                                                    SCancelRateManager.TYPE_S_FAST)
        if total_deal_money >= threash_money_w * 10000 and rate >= threshold_rate:
            return True, f"近1s有大卖单({round(total_deal_money / 10000, 1)}万/{threash_money_w}万({threshold_rate_msg}),成交占比:{total_deal_money}/{total_fast_money})"
@@ -521,7 +524,6 @@
            l2_log.s_cancel_debug(code, f"S慢砸监听范围:{watch_info}")
        except Exception as e:
            logger_l2_s_cancel.exception(e)
# ---------------------------------L撤-------------------------------
@@ -1219,7 +1221,8 @@
                if cancel_data:
                    if str(wi) in after_place_order_index_dict:
                        # 真实下单位置之后的按照权重比例来计算
                        canceled_num += total_data[wi]["val"]["num"] * (10 - after_place_order_index_dict[str(wi)]) // 10
                        canceled_num += total_data[wi]["val"]["num"] * (
                                    10 - after_place_order_index_dict[str(wi)]) // 10
                    else:
                        canceled_num += total_data[wi]["val"]["num"]
@@ -1416,6 +1419,7 @@
        print(self.__get_cancel_l_down_after_place_order_index_dict(code))
# --------------------------------H撤-------------------------------
class HourCancelBigNumComputer:
    __db = 0
l2/l2_data_manager_new.py
@@ -672,7 +672,7 @@
        current_total_sell_data = L2MarketSellManager().get_current_total_sell_data(code)
        place_order_count = trade_data_manager.PlaceOrderCountManager().get_place_order_count(code)
        # 只有初次下单 + 总抛压大于500w能激进下单
        if place_order_count > 0 or current_total_sell_data[1] < 500 * 10000:
        if place_order_count > 0 or current_total_sell_data is None or current_total_sell_data[1] < 500 * 10000:
            return None
        if global_util.zyltgb_map.get(code) > 50 * 100000000:
third_data/data_server.py
@@ -708,6 +708,7 @@
    def __process_kpl_data(self, data_origin):
        def do_limit_up(result_list_):
            try:
            if result_list_:
                # 保存涨停时间
                codes_set = set()
@@ -762,7 +763,8 @@
                                logger_debug.exception(e)
                kpl_data_manager.KPLLimitUpDataRecordManager.save_record(tool.get_now_date_str(), result_list_)
                self.__kplDataManager.save_data(type_, result_list_)
            except Exception as e:
                logger_debug.exception(e)
        # 将"概念"二字替换掉
        data = data_origin
        type_ = data["type"]