| | |
| | | need_get_volumn = False |
| | | if code not in global_util.max60_volumn or global_util.max60_volumn.get(code) is None: |
| | | need_get_volumn = True |
| | | if not need_get_volumn and code_nature_analyse.CodeNatureRecordManager.get_nature( |
| | | if not need_get_volumn and code_nature_analyse.CodeNatureRecordManager.get_nature_cache( |
| | | code) is None: |
| | | need_get_volumn = True |
| | | if need_get_volumn: |
| | | limit_up_price = gpcode_manager.get_limit_up_price(code) |
| | | if limit_up_price is None: |
| | | inited_data.re_set_price_pres([code], True) |
| | | volumes_data = inited_data.get_volumns_by_code(code, 150) |
| | | volumes = inited_data.parse_max_volume(volumes_data[:90], |
| | | code_nature_analyse.is_new_top( |
| | | limit_up_price, |
| | | volumes_data[:90])) |
| | | logger_first_code_record.info("{} 获取到首板60天最大量:{}", code, volumes) |
| | | code_volumn_manager.set_histry_volumn(code, volumes[0], volumes[1], volumes[2]) |
| | | # 判断K线形态 |
| | | # is_has_k_format, msg = code_nature_analyse.is_has_k_format( |
| | | # gpcode_manager.get_limit_up_price(code), volumes_data) |
| | | # if not is_has_k_format: |
| | | # logger_first_code_record.info("{}首板K线形态不好,{}", code, msg) |
| | | # # 股性不好,就不要加入 |
| | | # bad_codes.add(code) |
| | | # # 加入禁止交易代码 |
| | | # l2_trade_util.forbidden_trade(code) |
| | | code_nature_analyse.set_record_datas(code, |
| | | gpcode_manager.get_limit_up_price(code), |
| | | volumes_data) |
| | | continue |
| | | try: |
| | | volumes_data = inited_data.get_volumns_by_code(code, 150) |
| | | volumes = inited_data.parse_max_volume(volumes_data[:90], |
| | | code_nature_analyse.is_new_top( |
| | | limit_up_price, |
| | | volumes_data[:90])) |
| | | logger_first_code_record.info("{} 获取到首板60天最大量:{}", code, volumes) |
| | | code_volumn_manager.set_histry_volumn(code, volumes[0], volumes[1], volumes[2]) |
| | | # 判断K线形态 |
| | | # is_has_k_format, msg = code_nature_analyse.is_has_k_format( |
| | | # gpcode_manager.get_limit_up_price(code), volumes_data) |
| | | # if not is_has_k_format: |
| | | # logger_first_code_record.info("{}首板K线形态不好,{}", code, msg) |
| | | # # 股性不好,就不要加入 |
| | | # bad_codes.add(code) |
| | | # # 加入禁止交易代码 |
| | | # l2_trade_util.forbidden_trade(code) |
| | | code_nature_analyse.set_record_datas(code, |
| | | gpcode_manager.get_limit_up_price(code), |
| | | volumes_data) |
| | | except Exception as e: |
| | | logger_first_code_record.error(f"{code}:{str(e)}") |
| | | gpcode_manager.FirstCodeManager.add_record(codes) |
| | | # 初始化板块信息 |
| | | for code in codes: |
| | |
| | | if is_limit_up: |
| | | # 加入首板涨停 |
| | | gpcode_manager.FirstCodeManager.add_limited_up_record([code]) |
| | | pricePre = gpcode_manager.get_price_pre(code) |
| | | pricePre = gpcode_manager.get_price_pre_cache(code) |
| | | if pricePre is None: |
| | | inited_data.re_set_price_pres([code]) |
| | | |