| | |
| | | block_codes_dict = {} |
| | | for day in self.__block_day_datas: |
| | | for b in self.__block_day_datas[day]: |
| | | total_limit_up_count = self.__block_day_datas[day][b][0] + self.__block_day_datas[day][b][1] |
| | | if total_limit_up_count < 3: |
| | | finally_limit_up_count = self.__block_day_datas[day][b][0] |
| | | if finally_limit_up_count < 3: |
| | | continue |
| | | # 板块涨停个数 |
| | | if b not in block_count_dict: |
| | |
| | | if day not in self.__block_day_datas: |
| | | continue |
| | | if b in self.__block_day_datas[day]: |
| | | total_limit_up_count = self.__block_day_datas[day][b][0] + self.__block_day_datas[day][b][1] |
| | | finally_limit_up_count = self.__block_day_datas[day][b][0] |
| | | else: |
| | | total_limit_up_count = 0 |
| | | if b in self.__block_day_datas[day] and total_limit_up_count >= 3: |
| | | finally_limit_up_count = 0 |
| | | if b in self.__block_day_datas[day] and finally_limit_up_count >= 3: |
| | | # 板块代码数量>=3个 |
| | | temp.append(day) |
| | | else: |
| | |
| | | if cls.__days: |
| | | volumes_data = HistoryKDataManager().get_history_bars(code, cls.__days[1]) |
| | | if volumes_data: |
| | | volumes_data = volumes_data[:cls.__LATEST_DAY_COUNT - 1] |
| | | volumes_data = volumes_data[:cls.__LATEST_DAY_COUNT] |
| | | cls.__k_datas[code] = volumes_data |
| | | if not volumes_data: |
| | | volumes_data = init_data_util.get_volumns_by_code(code, cls.__LATEST_DAY_COUNT - 1) |
| | | volumes_data = init_data_util.get_volumns_by_code(code, cls.__LATEST_DAY_COUNT) |
| | | if volumes_data: |
| | | cls.__k_datas[code] = volumes_data |
| | | # 获取最大涨幅 |
| | |
| | | rate = int((volumes_data[0]["close"] - min_price) * 100 / min_price) |
| | | cls.__k_max_rate[code] = rate |
| | | return cls.__k_datas.get(code) |
| | | |
| | | |
| | | if __name__ == "__main__": |
| | | # datas = LatestLimitUpBlockManager().statistics_limit_up_block_infos() |
| | | # print(datas) |
| | | code = "600126" |
| | | blocks = LimitUpCodesBlockRecordManager().get_radical_buy_blocks(code) |
| | | print(blocks) |