Administrator
2024-05-13 9cf6084a0b7a61a1ede7e739869f659a8ea5d253
L后囊括大单
3个文件已修改
41 ■■■■■ 已修改文件
l2/cancel_buy_strategy.py 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
third_data/kpl_api.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
trade/huaxin/huaxin_trade_server.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/cancel_buy_strategy.py
@@ -1211,6 +1211,8 @@
                    if val["num"] < min_num:
                        continue
                    cancel_data = l2_data_source_util.L2DataSourceUtils.get_limit_up_buy_canceled_data_v2(code,
                                                                                                          j,
                                                                                                          total_datas,
@@ -1308,7 +1310,37 @@
                                                                                           cancel_data['val'])) <= 0:
                                watch_indexes.add(i)
                                break
                    # 获取真实下单位后面10笔大单
                    try:
                        # 真实下单位置后面的数据就只看大单
                        big_min_num = int(29900 / (float(gpcode_manager.get_limit_up_price(code))))
                        MIN_NUM = int(5000 / (float(gpcode_manager.get_limit_up_price(code))))
                        real_place_order_info = self.__real_place_order_index_dict.get(code)
                        if real_place_order_info and not real_place_order_info[1]:
                            # 从真实下单位往后找
                            after_count = 0
                            for i in range(real_place_order_info[0] + 1, total_datas[-1]['index']+1):
                                if after_count > 10:
                                    break
                                data = total_datas[i]
                                val = data['val']
                                # 涨停买,且未撤单
                                if not L2DataUtil.is_limit_up_price_buy(val):
                                    continue
                                # 小金额过滤
                                if val['num'] < MIN_NUM:
                                    continue
                                left_count = l2_data_source_util.L2DataSourceUtils.get_limit_up_buy_no_canceled_count_v2(
                                    code, i,
                                    total_datas,
                                    local_today_canceled_buyno_map.get(
                                        code))
                                if left_count > 0:
                                    after_count+=1
                                    if val['num']>=big_min_num:
                                        watch_indexes.add(i)
                    except Exception as e:
                        pass
                    self.__set_watch_indexes(code, buy_single_index, re_compute, watch_indexes)
                    l2_log.l_cancel_debug(code,
                                          f"设置监听范围({msg}){'(重新计算)' if re_compute else ''}, 数据范围:{re_start_index}-{end_index} 监听范围-{watch_indexes}")
third_data/kpl_api.py
@@ -19,7 +19,7 @@
DABAN_TYPE_EVER_LIMIT_DOWN = 5
def __base_request(url, data, timeout=60):
def __base_request(url, data, timeout=10):
    DELEGATE = True
    if not DELEGATE:
        headers = {
trade/huaxin/huaxin_trade_server.py
@@ -1574,7 +1574,7 @@
                                         total_left_num * float(limit_up_price) * 100 * 100 / buy1_money, 2),  # 成交进度比例
                                     "limit_up_price": float(gpcode_manager.get_limit_up_price(code)),
                                     "is_near_big_order": is_near_big_order,
                                     "block":''
                                     "block": ''
                                     }
                            # 获取当前板块
                            try:
@@ -1741,7 +1741,8 @@
                # 可以激进下单且必须是首次下单才能激进
                place_order_count = trade_data_manager.PlaceOrderCountManager().get_place_order_count(code)
                if place_order_count == 0 and current_total_sell_data[1] > 500*10000 and global_util.zyltgb_map.get(code) < 50 * 100000000:
                if place_order_count == 0 and current_total_sell_data[1] > 500 * 10000 and global_util.zyltgb_map.get(
                        code) < 50 * 100000000:
                    # 首次下单,自由流通50亿以下,总卖额500w才能激进下单
                    mode_descs.insert(0, "成交触发")
                    last_index = total_datas[-1]["index"]