有强度有强拉策略分支 统一  数据加入100亿市值以上无大单,瞬时量幅比>1,加入领涨次数限制。
K线熟悉指标中的二次近前高风险赋值条件参数调整至更小范围。
3个文件已修改
28 ■■■■■ 已修改文件
strategy/L2_data_analysis.py 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
strategy/all_K_line.py 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
strategy/buying_strategy.py 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
strategy/L2_data_analysis.py
@@ -65,7 +65,7 @@
            if sublist[0][2][3] is not None:
                huaxin_time_format = sublist[0][2][3]
                order_transaction_time = huaxin_util.convert_time(huaxin_time_format)
                logger.info(f"找到L2大单,对应行列表: sublist[0]===={sublist[0]}  大单金额:{sublist[0][2][2]}转换后时间格式:{order_transaction_time}")
                logger.info(f"找到L2大单,对应行列表: sublist[0]===={sublist[0]}  大单金额:{sublist[0][2][2]}元 ,转换后时间格式:{order_transaction_time}")
            found = True  # 设置标志为 True,表示找到了
strategy/all_K_line.py
@@ -160,8 +160,8 @@
                # 最高位据昨日较远 且 昨收价距历史最高价差距较小(小于5%,涨幅5%是左右是最容易把低吸骗进去的日内涨幅) 且 整体涨跌幅度较大  【当前二度突破近前高风险】
                # 【双成药业 2024-11-08 这样的二次近前高,实际数值为1.4646...,为安全起见还是设置为1.5】
                if (2 < historical_high_price_index < 15 and len(it_K_line) >= 90) and (
                        historical_high_price / round(it_K_line[0]['close'], 2) < 1.5) and (
                        historical_high_price > historical_low_price * 1.8):
                        historical_high_price / round(it_K_line[0]['close'], 2) < 1.2) and (
                        historical_high_price > historical_low_price * 2):
                    it_K_line[0]['risk_position'] = 'recent_second_break_near_high_position_risk'
                # 昨日就是最高位 且 整体涨跌幅度较大 【当前高位风险】
                if (historical_high_price_index < 2 and len(it_K_line) >= 90) and (
strategy/buying_strategy.py
@@ -221,7 +221,8 @@
                                    '专用设备'}
                # 查询当前个股的代码是否在板块强度个股列表中(低吸优选目标)
                strength_list_have_it = False  # 为查询结果赋初值
                strength_list_have_it = False  # 是否有强度赋初值
                have_leading_increase = False  # 是否有领涨次数赋初值
                strength_plate = []
                market_sift_plate_stock_dict = data_cache.market_sift_plate_stock_dict
                if market_sift_plate_stock_dict is not None:
@@ -244,6 +245,9 @@
                                    # 如果子列表长度大于1且第二个元素包含 当前进入涨幅视界的symbol_code
                                    strength_list_have_it = True
                                    strength_plate = correlation_plate_list
                                if stock_list[6] >= 1:
                                    async_log_util.info(logger, f"包含有强度的板块中,任意一次领涨次数>=1")
                                    have_leading_increase = True
                '''
                初始化K线近期显著指标的序号 并找出来,如果没有,则返回空值
                '''
@@ -354,7 +358,7 @@
                                            logger_info(
                                                f"【不利】自由市值小于6亿!不买!! 公司名称:{k_line_data[0]['sec_name']},最新价: {current_price}")
                                        elif (
                                                free_market_value == 0 or free_market_value == 0.0) and free_market_value > 100 and L2_found_big_order:
                                                free_market_value == 0 or free_market_value == 0.0) and free_market_value > 100 and L2_found_big_order is False:
                                            logger_info(
                                                f"【不利】自由市值大于100亿,且未发现大单!不买!! 公司名称:{k_line_data[0]['sec_name']},最新价: {current_price}")
                                        elif len(intersection_plate) > 0:
@@ -505,9 +509,9 @@
                                        intersection_plate = bought_plate_set.intersection(strength_plate_set)
                                        if len(intersection_plate) > 0:
                                            logger_info(f"重复相交强度==={intersection_plate}")
                                        if last_volume_to_growth_ratio < 0.8:
                                        if last_volume_to_growth_ratio < 1:
                                            logger_info(
                                                f"【有强度 有小量换大涨幅】瞬时量幅比< 0.8 !瞬时量幅比:{round(last_volume_to_growth_ratio, 2)}%,最新价: {current_price},瞬时涨幅:{round(tick_growth, 2)}%,当日当时涨幅:{today_growth}%,当前时间:{current_created_at}。")
                                                f"【有强度 有小量换大涨幅】瞬时量幅比< 1 !瞬时量幅比:{round(last_volume_to_growth_ratio, 2)}%,最新价: {current_price},瞬时涨幅:{round(tick_growth, 2)}%,当日当时涨幅:{today_growth}%,当前时间:{current_created_at}。")
                                            if tick_growth >= 1:
                                                logger_info(
                                                    f"【有强度 有小量换大涨幅 有强拉】瞬时涨幅 > 1% !瞬时涨幅:{round(tick_growth, 2)}%")
@@ -530,8 +534,7 @@
                                                # elif k_line_data[0]['attribute'] == 'up_down' and k_line_data[0]['today_volume_shape'] == 'increases_down':
                                                #     logger_info(
                                                #         f"【不利】昨日高开低走 且 放量下跌,不买!!")
                                                elif k_line_data[0]['attribute'] == 'down_down' and k_line_data[0][
                                                    'today_volume_shape'] == 'increases_down':
                                                elif k_line_data[0]['attribute'] == 'down_down' and k_line_data[0]['today_volume_shape'] == 'increases_down':
                                                    logger_info(
                                                        f"【不利】昨日低开低走 且 放量下跌,不买!!")
                                                elif throwing_pressure_position[0] is True:
@@ -550,9 +553,12 @@
                                                        free_market_value == 0 or free_market_value == 0.0) and free_market_value < 6:
                                                    logger_info(
                                                        f"【不利】自由市值小于6亿!不买!! 公司名称:{k_line_data[0]['sec_name']},最新价: {current_price}")
                                                elif L2_found_big_order is False:
                                                elif have_leading_increase is False:
                                                    logger_info(
                                                        f"【不利】L2记录中未发现大单!不买!! 公司名称:{k_line_data[0]['sec_name']},最新价: {current_price}")
                                                        f"【不利】有强度的板块中没有发现领涨次数!不买!! 公司名称:{k_line_data[0]['sec_name']},最新价: {current_price}")
                                                elif (free_market_value == 0 or free_market_value == 0.0) and free_market_value > 100 and L2_found_big_order is False:
                                                    logger_info(
                                                        f"【不利】自由市值大于100亿,且未发现大单!不买!! 公司名称:{k_line_data[0]['sec_name']},最新价: {current_price}")
                                                elif data_cache.have_strength_buy_times >= 1:
                                                    logger_info(f"【不利】有强度买入 1 次了!不买了!!公司名称:{k_line_data[0]['sec_name']},")
                                                    L2_data_analysis.find_L2_big_order_of_code(symbol_code)