| | |
| | | is_strong_block = True |
| | | break |
| | | |
| | | if not is_strong_block: |
| | | temp_block_codes = set(copy.deepcopy(block_codes)) |
| | | temp_block_codes.discard(code) |
| | | if len(temp_block_codes) >= 3: |
| | | is_strong_block = True |
| | | max_rank = 2 |
| | | # 强势板块买老四 |
| | | if is_strong_block: |
| | |
| | | code_limit_up_reason_dict, |
| | | yesterday_current_limit_up_codes, |
| | | exclude_first_codes, |
| | | len(current_open_limit_up_codes), |
| | | shsz=True, limit_up_time=first_limit_up_time) |
| | | len( |
| | | current_open_limit_up_codes), |
| | | shsz=True, |
| | | limit_up_time=first_limit_up_time) |
| | | # record_shsz_rank, record_shsz_rank_codes = kpl_block_util.get_code_record_rank(code, block, |
| | | # limit_up_record_datas, |
| | | # code_limit_up_reason_dict, |
| | |
| | | if current_shsz_rank < len(current_open_limit_up_codes) + max_rank: |
| | | return True, False, f"【{block}】前排代码:{current_shsz_rank}", is_strong_block |
| | | else: |
| | | # 看自由流通市值是否小于20亿 |
| | | if is_strong_block: |
| | | zyltgb = global_util.zyltgb_map.get(code) |
| | | if zyltgb and zyltgb < 20 * 100000000: |
| | | return True, False, f"【{block}】涨停数量({len(block_codes)})>=4 自由流通市值({zyltgb})小于20亿", is_strong_block |
| | | return False, False, f"【{block}】前排代码:{front_current_shsz_rank_codes} 超过{len(current_open_limit_up_codes) + max_rank}个", is_strong_block |
| | | |
| | | # 过时的代码 |
| | |
| | | # 买 |
| | | if cancel_data: |
| | | try: |
| | | cancel_info = "{}-{}".format(cancel_data["index"],f"{cancel_data['val']['time']}") + (f".{cancel_data['val']['tms']}" if "tms" in cancel_data["val"] else '') |
| | | left_num = data["val"]["num"] - cancel_data["val"]["num"] |
| | | if left_num > 0: |
| | | cancel_info = f"{left_num}手未撤:{cancel_data['index']}" |
| | | else: |
| | | cancel_info = "{}-{}".format(cancel_data["index"], f"{cancel_data['val']['time']}") + ( |
| | | f".{cancel_data['val']['tms']}" if "tms" in cancel_data["val"] else '') |
| | | except Exception as e: |
| | | logging.exception(e) |
| | | else: |