| | |
| | | from db.redis_manager_delegate import RedisUtils |
| | | from third_data import kpl_block_util, kpl_api, kpl_util |
| | | from settings.trade_setting import MarketSituationManager |
| | | from third_data.history_k_data_manager import HistoryKDataManager |
| | | from third_data.history_k_data_util import HistoryKDatasUtils |
| | | from third_data.kpl_data_constant import LimitUpCodesBlockRecordManager, ContainsLimitupCodesBlocksManager |
| | | from third_data.third_blocks_manager import BlockMapManager |
| | |
| | | break |
| | | if not has_continue: |
| | | continue |
| | | |
| | | has_big_deal = False |
| | | # 最近10个交易日的成交额要大于10亿 |
| | | volumes_data = HistoryKDataManager().get_history_bars(code, dates[0]) |
| | | if volumes_data: |
| | | for d in volumes_data[:10]: |
| | | if d["amount"] > 10e8: |
| | | has_big_deal = True |
| | | break |
| | | if not has_big_deal: |
| | | continue |
| | | target_codes.add(code) |
| | | # 代码对应的板块 |
| | | code_blocks = {} |
| | |
| | | zylt_list = code_info_list[:max_count] |
| | | # 取涨停次数最多的 |
| | | temp_codes = [x[0] for x in zylt_list] |
| | | code_info_list.sort(key=lambda x: limit_up_count_dict[x[0]], reverse=True) |
| | | code_info_list.sort(key=lambda x: x[1], reverse=True) |
| | | limit_up_count_max = code_info_list[:2] |
| | | rank2_codes = set() |
| | | for d in limit_up_count_max: |
| | |
| | | continue |
| | | zylt_list.append((c, limit_up_count_dict.get(c))) |
| | | |
| | | # 按照股票实际涨停次数排序 |
| | | zylt_list.sort(key=lambda x: limit_up_count_dict[x[0]], reverse=True) |
| | | # 按照股票涨停次数排序 |
| | | zylt_list.sort(key=lambda x: x[1], reverse=True) |
| | | zylt_list = [x[0] for x in zylt_list] |
| | | index = 0 |
| | | |