| | |
| | | return False, True, f"14:57后不能交易" |
| | | if 130100 >= now_time_int >= 112900 or now_time_int < 93100: |
| | | if now_time_int < 93100: |
| | | # 判断近120天是否有涨停 |
| | | k_format = code_nature_analyse.CodeNatureRecordManager().get_k_format_cache(code) |
| | | if k_format and len(k_format) >= 12 and not k_format[11]: |
| | | return False, True, f"09:31:00之前下单,90个交易日无涨停" |
| | | |
| | | # 判断成交的大单数量 |
| | | data_list = BigOrderDealManager().get_total_buy_money_list(code) |
| | | bigger_money = 2990000 |
| | |
| | | if d < bigger_money: |
| | | continue |
| | | fdatas.append(d) |
| | | if len(fdatas) < 3: |
| | | return False, True, f"09:31:00之前下单,成交大单数量({len(fdatas)})不足3个" |
| | | if len(fdatas) < 1: |
| | | return False, True, f"09:31:00之前下单,成交大单数量({len(fdatas)})不足1个" |
| | | else: |
| | | # 判断数据是否卡 |
| | | total_datas = local_today_datas.get(code) |
| | |
| | | buy1_money = 1 |
| | | deal_rate = round(total_deal_money / buy1_money, 2) |
| | | if deal_rate < 0.05: |
| | | return False, True, f"板上放量成交金额不足,近2s总成交比例({deal_rate}):{total_deal_money}/{buy1_money}小于0.05" |
| | | # 判断成交进度是否距离我们的位置很近 |
| | | trade_index, is_default = cls.__TradeBuyQueue.get_traded_index(code) |
| | | if False and not is_default and trade_index: |
| | | not_cancel_num = 0 |
| | | num_operate_map = local_today_num_operate_map.get(code) |
| | | for i in range(trade_index + 1, total_data[-1]["index"] + 1): |
| | | if L2DataUtil.is_limit_up_price_buy(total_data[i]["val"]): |
| | | left_count = l2_data_source_util.L2DataSourceUtils.get_limit_up_buy_no_canceled_count_v2(code, |
| | | total_data[ |
| | | i][ |
| | | "index"], |
| | | total_data, |
| | | local_today_canceled_buyno_map.get( |
| | | code)) |
| | | if left_count > 0: |
| | | not_cancel_num += total_data[i]["val"]["num"] |
| | | m_base_val = l2_trade_factor.L2PlaceOrderParamsManager.get_base_m_val(code) |
| | | not_cancel_money = not_cancel_num * 100 * float(gpcode_manager.get_limit_up_price(code)) |
| | | if m_base_val > not_cancel_money: |
| | | return False, False, f"成交位置距离当前位置纯买额({not_cancel_money})小于m值({m_base_val})" |
| | | # 判断成交进度到当前数据的笔数,如果少于10笔且还有未成交的大单(>=299)就可以下单 |
| | | trade_index, is_default = cls.__TradeBuyQueue.get_traded_index(code) |
| | | if trade_index is None: |
| | | trade_index = 0 |
| | | total_count = 0 |
| | | total_big_count = 0 |
| | | for i in range(trade_index + 1, total_data[-1]["index"] + 1): |
| | | data = total_data[i] |
| | | val = data["val"] |
| | | if not L2DataUtil.is_limit_up_price_buy(val): |
| | | continue |
| | | money = val["num"] * float(val["price"]) |
| | | if money < 5000: |
| | | continue |
| | | |
| | | left_count = l2_data_source_util.L2DataSourceUtils.get_limit_up_buy_no_canceled_count_v2( |
| | | code, |
| | | i, |
| | | total_data, |
| | | local_today_canceled_buyno_map.get( |
| | | code)) |
| | | if left_count > 0: |
| | | total_count += 1 |
| | | if money > 29900: |
| | | total_big_count += 1 |
| | | if total_count > 10: |
| | | break |
| | | if total_count > 10 or total_big_count < 1: |
| | | return False, True, f"板上放量成交金额不足,近2s总成交比例({deal_rate}):{total_deal_money}/{buy1_money}小于0.05,未成交数量-{total_count},大单数量-{total_big_count}" |
| | | # 上证下单需要有成交大单(包含主动买与被动买)或者挂买的大单 |
| | | if tool.is_sh_code(code): |
| | | deal_big_order_count = BigOrderDealManager().get_total_buy_count(code) |
| | |
| | | if is_in_strong_time_30 and is_best_zylt: |
| | | # 强势30分钟,最优市值, 有可以下单的板块,不看量 |
| | | return True, False, can_buy_result[2] |
| | | # 注释量的影响 |
| | | # if k_format and (k_format[1][0] or k_format[3][0]) and len(k_format) >= 12 and k_format[11]: |
| | | # # 破前高/接近前高且30天内有涨停 |
| | | # if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[1]: |
| | | # return False, True, f"股价创新高或者逼近前高且30天内有涨停,当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[1]}" |
| | | |
| | | # 注释量的影响 |
| | | # if HighIncreaseCodeManager().is_in(code): |
| | | # if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < 0.59: |
| | | # return False, True, f"5天内3次涨停,量未达到59%({cls.volume_rate_info[code][0]})" |
| | | msg_list = [] |
| | | if is_in_strong_time: |
| | | msg_list.append("强势10分钟") |
| | | # 上5个交易日有炸板之后 |
| | | # 注释量的影响 |
| | | # if has_open_limit_up_in_5: |
| | | # if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < 0.15: |
| | | # return False, True, f"强势10分钟,上5个交易日炸板,量未达到{0.15}({cls.volume_rate_info[code][0]})" |
| | | # |
| | | # # 上5个交易日有跌停 |
| | | # if has_limit_down_in_5: |
| | | # if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < 0.15: |
| | | # return False, True, f"强势10分钟,上5个交易日跌停,量未达到{0.15}({cls.volume_rate_info[code][0]})" |
| | | # |
| | | # # 获取量的参考日期 |
| | | # if code in global_util.max60_volumn: |
| | | # day = global_util.max60_volumn[code][1] |
| | | # if day in HistoryKDatasUtils.get_latest_trading_date_cache(5): |
| | | # if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < 0.15 and not is_special: |
| | | # return False, True, f"强势10分钟,参考量在最近5天,无辨识度,量未达到0.15({cls.volume_rate_info[code][0]})" |
| | | |
| | | # 独苗 |
| | | if not can_buy_result[0] and can_buy_result[1]: |
| | |
| | | # 如果没有辨识度才不买 |
| | | if not is_special: |
| | | return False, True, f"强势10分钟,无辨识度, 独苗({can_buy_result[4]})不下单({can_buy_result[4]})自由流通市值({zyltgb_as_yi})不是特优市值" |
| | | # 注释量的影响 |
| | | # if k_format and (k_format[1][0] or k_format[3][0]): |
| | | # msg_list.append("股价创新高或者逼近前高") |
| | | # # 股价创新高或者逼近前高 |
| | | # if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[1]: |
| | | # return False, True, f"强势10分钟,独苗({can_buy_result[4]}),股价创新高或者逼近前高,当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[1]}" |
| | | # else: |
| | | # if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < volume_rate_thresholds[ |
| | | # 0] and not is_special: |
| | | # return False, True, f"强势10分钟,无辨识度,独苗({can_buy_result[4]}),当日量比({cls.volume_rate_info[code][0]})小于{volume_rate_thresholds[0]}" |
| | | elif not can_buy_result[0]: |
| | | return False, True, f"非独苗不满足身位:{can_buy_result[2]}" |
| | | else: |