| | |
| | | @param code: |
| | | @return: |
| | | """ |
| | | if code.find("60") == 0: |
| | | if tool.is_sh_code(code): |
| | | # 上证不激进下单 |
| | | return None |
| | | |
| | |
| | | total_data = local_today_datas.get(code) |
| | | |
| | | # 9:32之前上证开1的票不买 |
| | | if code.find("60") == 0 and int(total_data[-1]["val"]["time"].replace(":", "")) <= int("093200"): |
| | | if tool.is_sh_code(code) and int(total_data[-1]["val"]["time"].replace(":", "")) <= int("093200"): |
| | | # 获取涨停时间 |
| | | limit_up_data = kpl_data_manager.KPLLimitUpDataRecordManager.record_code_dict.get(code) |
| | | if limit_up_data: |
| | |
| | | return False, False, f"成交位置距离当前位置纯买额({not_cancel_money})小于m值({m_base_val})" |
| | | |
| | | # 上证下单需要有成交大单(包含主动买与被动买)或者挂买的大单 |
| | | if code.find("60") == 0: |
| | | if tool.is_sh_code(code): |
| | | deal_big_order_count = BigOrderDealManager().get_total_buy_count(code) |
| | | if deal_big_order_count < 1: |
| | | # 统计挂买大单 |
| | |
| | | # (time_str, round(money), volume, sell_1_info) |
| | | refer_sell_data = cls.__L2MarketSellManager.get_refer_sell_data(code, start_time_str) |
| | | active_buy_blocks = cls.get_active_buy_blocks(code) |
| | | if code.find("60") == 0: |
| | | if tool.is_sh_code(code): |
| | | if refer_sell_data is None: |
| | | # 设置默认卖信息 |
| | | refer_sell_data = (start_time_str, 0, 0, (round(float(total_datas[start_index]["val"]["price"]), 2), 0)) |
| | |
| | | trigger_buy = True |
| | | # 间隔最大时间为3s |
| | | max_space_time_ms = 3 * 1000 |
| | | if code.find("00") == 0 and not is_at_limit_up: |
| | | if tool.is_sz_code(code) and not is_at_limit_up: |
| | | # 深证非板上放量 |
| | | max_space_time_ms = 1 * 1000 |
| | | |
| | | # 上证的间隔时间为1s |
| | | if code.find("60") == 0: |
| | | if tool.is_sh_code(code): |
| | | max_space_time_ms = 1 * 1000 |
| | | |
| | | # 不下单的信息 |
| | |
| | | # 板上下单需要安全笔数3笔 |
| | | safe_count = 3 |
| | | else: |
| | | if code.find("00") == 0: |
| | | if tool.is_sz_code(code): |
| | | # 深证上板 |
| | | safe_count = 2 |
| | | elif code.find("60") == 0: |
| | | elif tool.is_sh_code(code): |
| | | # 上证安全笔数为3 |
| | | safe_count = 3 |
| | | if code.find("00") == 0: |
| | | if tool.is_sz_code(code): |
| | | money_y = code_volumn_manager.get_reference_volume_as_money_y(code) |
| | | # 大于8亿的安全笔数必须有8笔 |
| | | if money_y >= 8: |