Administrator
2024-08-26 c4e712f0015107176d519e9cc38009ce7629ed8a
09:31之前上证大单调整为3个
4个文件已修改
27 ■■■■ 已修改文件
code_attribute/code_nature_analyse.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
l2/l2_data_manager_new.py 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
test/test_code_attribute.py 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
third_data/code_plate_key_manager.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
code_attribute/code_nature_analyse.py
@@ -614,13 +614,13 @@
# 是否涨停
def __is_limit_up(code, data):
    limit_up_price = float(gpcode_manager.get_limit_up_price_by_preprice(code, data["pre_close"]))
    return abs(limit_up_price - data["close"]) < 0.001
    return abs(limit_up_price - data["close"]) < 0.009
# 是否涨停过
def __is_limited_up(code, data):
    limit_up_price = float(gpcode_manager.get_limit_up_price_by_preprice(code, data["pre_close"]))
    return abs(limit_up_price - data["high"]) < 0.001
    return abs(limit_up_price - data["high"]) < 0.009
# 多少天内是否有涨停/曾涨停
l2/l2_data_manager_new.py
@@ -865,8 +865,9 @@
                    if d < bigger_money:
                        continue
                    fdatas.append(d)
                if len(fdatas) < 1:
                    return False, True, f"09:31:00之前下单,成交大单数量({len(fdatas)})不足1个"
                thresh_count = 3 if tool.is_sh_code(code) else 1
                if len(fdatas) < thresh_count:
                    return False, True, f"09:31:00之前下单,成交大单数量({len(fdatas)})不足{thresh_count}个"
                else:
                    # 判断数据是否卡
                    total_datas = local_today_datas.get(code)
test/test_code_attribute.py
@@ -39,9 +39,19 @@
if __name__ == "__main__":
    code = "301176"
    code = "301337"
    limit_up_price = 34.56
    volumes_data = init_data_util.get_volumns_by_code(code, 150)
    print(len(volumes_data))
    volumes = init_data_util.parse_max_volume(code, volumes_data[:90],
                                              code_nature_analyse.is_new_top(code,
                                                                             limit_up_price,
                                                                             volumes_data[
                                                                             :90]) or code_nature_analyse.is_near_top(
                                                  code,
                                                  limit_up_price,
                                                  volumes_data[:90]))
    # 保存K线形态
    k_format = code_nature_analyse.get_k_format(code, limit_up_price, volumes_data)
    # is_too_high()
    # code = "601022"
    # volumes_data = init_data_util.get_volumns_by_code(code, 150)
third_data/code_plate_key_manager.py
@@ -626,7 +626,7 @@
        if not block_codes:
            # 高位板泛化板块中无板块
            if not high_level_block_codes.get(block):
                return False, True, f"{block}:板块无涨停", False, False
                return False, True, f"【{block}】:板块无涨停", False, False
        elif len(block_codes) == 1 and code in block_codes:
            if not high_level_block_codes.get(block):
                return False, True, f"{block}:板块只有当前代码涨停", False, False
@@ -776,7 +776,7 @@
        if not block_codes:
            # 高位板泛化板块中无板块
            if not high_level_block_codes.get(block):
                return False, True, f"{block}:板块无涨停", False, False, 0, 0, 0
                return False, True, f"【{block}】:板块无涨停", False, False, 0, 0, 0
        elif len(block_codes) == 1 and code in block_codes:
            if not high_level_block_codes.get(block):
                return False, True, f"{block}:板块只有当前代码涨停", False, False, 0, 0, 0