| | |
| | | "zyltgb": constant.RADICAL_BUY_ZYLTGB_AS_YI_RANGES, |
| | | "top_block_count_by_market_strong": constant.RADICAL_BUY_TOP_IN_COUNT_BY_MARKET_STRONG, |
| | | "special_codes_max_block_in_rank": constant.RADICAL_BUY_TOP_IN_INDEX_WITH_SPECIAL, |
| | | "ignore_block_in_money":constant.IS_IGNORE_BLOCK_IN_MONEY_WITH_MARKET_STRONG |
| | | "ignore_block_in_money_market_strong":constant.IGNORE_BLOCK_IN_MONEY_MARKET_STRONG |
| | | }} |
| | | self.send_response({"code": 0, "data": data, "msg": f""}, |
| | | client_id, |
| | |
| | | if radical_buy.get("special_codes_max_block_in_rank"): |
| | | constant.RADICAL_BUY_TOP_IN_INDEX_WITH_SPECIAL = radical_buy.get( |
| | | "special_codes_max_block_in_rank") |
| | | if radical_buy.get('ignore_block_in_money') is not None: |
| | | constant.IS_IGNORE_BLOCK_IN_MONEY_WITH_MARKET_STRONG = radical_buy.get('ignore_block_in_money') |
| | | if radical_buy.get('ignore_block_in_money_market_strong') is not None: |
| | | constant.IGNORE_BLOCK_IN_MONEY_MARKET_STRONG = radical_buy.get('ignore_block_in_money_market_strong') |
| | | self.send_response({"code": 0, "data": {}, "msg": f""}, |
| | | client_id, |
| | | request_id) |
| | |
| | | ##判断监听的数据中是否有大单## |
| | | # 之前的大单为100w,现在改为正常大单 |
| | | has_big_num = False |
| | | BIG_ORDER_NUM_THRESHOLD = l2_data_util.get_big_money_val(gpcode_manager.get_limit_up_price_as_num(code), tool.is_ge_code(code)) |
| | | BIG_ORDER_NUM_THRESHOLD = int(round(BIG_ORDER_NUM_THRESHOLD/(gpcode_manager.get_limit_up_price_as_num(code)*100))) |
| | | BIG_ORDER_NUM_THRESHOLD = l2_data_util.get_big_money_val( |
| | | gpcode_manager.get_limit_up_price_as_num(code), tool.is_ge_code(code)) |
| | | BIG_ORDER_NUM_THRESHOLD = int( |
| | | round(BIG_ORDER_NUM_THRESHOLD / (gpcode_manager.get_limit_up_price_as_num(code) * 100))) |
| | | for i in watch_indexes: |
| | | # 是否有大单 |
| | | data = total_datas[i] |
| | |
| | | cancel_data['val'])) <= 0: |
| | | watch_indexes.add(i) |
| | | break |
| | | |
| | | # 计算真实下单位置到成交进度位的最大未撤大单前2 |
| | | big_order_list = [] |
| | | for i in range(start_index, end_index): |
| | | data = total_datas[i] |
| | | val = data['val'] |
| | | # 涨停买,且未撤单 |
| | | if not L2DataUtil.is_limit_up_price_buy(val): |
| | | continue |
| | | # 小金额过滤 |
| | | if val['num'] < BIG_ORDER_NUM_THRESHOLD: |
| | | continue |
| | | cancel_data = l2_data_source_util.L2DataSourceUtils.get_limit_up_buy_canceled_data_v2(code, |
| | | i, |
| | | total_datas, |
| | | local_today_canceled_buyno_map.get( |
| | | code)) |
| | | if not cancel_data: |
| | | big_order_list.append((i, val['num'])) |
| | | if big_order_list: |
| | | big_order_list.sort(key=lambda x: x[1], reverse=True) |
| | | watch_indexes |= set([x[0] for x in big_order_list[:2]]) |
| | | # 获取真实下单位后面10笔大单 |
| | | watch_indexes_after = self.__compute_l_down_watch_index_after_real_place_order_index(code) |
| | | if watch_indexes_after: |
| | |
| | | # 是否为新版下单 |
| | | IS_NEW_VERSION_PLACE_ORDER = True |
| | | |
| | | # 是否因为分数忽略板块流入 |
| | | IS_IGNORE_BLOCK_IN_MONEY_WITH_MARKET_STRONG = 0 |
| | | # 忽略板块流入的市场强度 |
| | | IGNORE_BLOCK_IN_MONEY_MARKET_STRONG = 101 |
| | | |
| | | |
| | |
| | | |
| | | @classmethod |
| | | def is_ignore_block_in_money(cls): |
| | | if constant.IS_IGNORE_BLOCK_IN_MONEY_WITH_MARKET_STRONG and cls.__market_strong and cls.__market_strong >= 80: |
| | | if cls.__market_strong and cls.__market_strong >= constant.IGNORE_BLOCK_IN_MONEY_MARKET_STRONG: |
| | | return True |
| | | return False |
| | | |