| | |
| | | l2_log.debug(code, "触发撤单,撤单位置:{} ,撤单原因:{}", index, "F撤不够2笔触发撤单") |
| | | cls.cancel_buy(code, msg="F撤不够2笔触发撤单") |
| | | return |
| | | l2_log.debug(code, "设置真实下单位:{}",index) |
| | | l2_log.debug(code, "设置真实下单位:{}", index) |
| | | cancel_buy_strategy.set_real_place_position(code, index, order_begin_pos.buy_single_index) |
| | | |
| | | # 处理华鑫L2数据 |
| | |
| | | order_begin_pos.count = 0 |
| | | order_begin_pos.buy_single_index = buy_single_index |
| | | if order_begin_pos.sell_info: |
| | | if float(total_datas[buy_single_index]["val"]["price"])>=3: |
| | | if float(total_datas[buy_single_index]["val"]["price"]) >= 3 and cls.volume_rate_info[code][0] > 0.3: |
| | | # 暂时打8折 |
| | | order_begin_pos.threshold_money = int(sell_info[1] * 0.8) |
| | | # 深证总卖大于1000万的票,m值打5折 |
| | |
| | | if code.find('00') == 0: |
| | | order_begin_pos.threshold_money = int(sell_info[1] * 0.5) |
| | | else: |
| | | order_begin_pos.threshold_money = int(sell_info[1] * 0.6) |
| | | order_begin_pos.threshold_money = int(sell_info[1] * 0.7) |
| | | else: |
| | | order_begin_pos.threshold_money = int(sell_info[1]) |
| | | l2_log.debug(code, "获取到买入信号起始点:{} ,计算范围:{}-{} ,量比:{},是否板上买:{},数据:{} 模式:{}({})", buy_single_index, |
| | |
| | | l2_log.debug(code, "获取到买入执行位置:{} m值:{} 纯买手数:{} 纯买单数:{} 是否板上买:{} 数据:{} ,量比:{} ,下单模式:{}", new_buy_exec_index, |
| | | threshold_money, |
| | | buy_nums, |
| | | buy_count, order_begin_pos.at_limit_up, total_datas[new_buy_exec_index], cls.volume_rate_info[code], order_begin_pos.mode) |
| | | buy_count, order_begin_pos.at_limit_up, total_datas[new_buy_exec_index], |
| | | cls.volume_rate_info[code], order_begin_pos.mode) |
| | | cls.__save_order_begin_data(code, OrderBeginPosInfo(buy_single_index=buy_single_index, |
| | | buy_exec_index=new_buy_exec_index, |
| | | buy_compute_index=new_buy_exec_index, |
| | |
| | | |
| | | # 保存闪电下单的买入信息 |
| | | if order_begin_pos.mode == OrderBeginPosInfo.MODE_FAST: |
| | | cls.__latest_fast_place_order_info_dict[code] = (order_begin_pos.sell_info[0], order_begin_pos.sell_info[1]) |
| | | cls.__latest_fast_place_order_info_dict[code] = ( |
| | | order_begin_pos.sell_info[0], order_begin_pos.sell_info[1]) |
| | | |
| | | # 数据是否处理完毕 |
| | | if new_buy_exec_index < compute_end_index: |
| | |
| | | # 需要排除的老大的代码 |
| | | exclude_first_codes = HighIncreaseCodeManager().list_all() |
| | | |
| | | # 获取主板历史身位 |
| | | # 获取主板开1的代码 |
| | | open_limit_up_codes = kpl_block_util.get_shsz_open_limit_up_codes(code, block, limit_up_record_datas, |
| | | code_limit_up_reason_dict) |
| | | # 剔除高位板 |
| | | if open_limit_up_codes and yesterday_current_limit_up_codes: |
| | | open_limit_up_codes -= yesterday_current_limit_up_codes |
| | | |
| | | |
| | | # 获取主板实时身位,剔除高位板 |
| | | current_shsz_rank, front_current_shsz_rank_codes = kpl_block_util.get_code_current_rank(code, block, |
| | |
| | | # 主板开1 |
| | | if current_shsz_rank < len(open_limit_up_codes) + 1 and record_shsz_rank < len(open_limit_up_codes) + 2: |
| | | # 属于龙1,龙2 |
| | | return True, f"{tool.get_now_time_str()} {block}:top10涨停板块,主板开1({open_limit_up_codes}),属于主板前龙{len(open_limit_up_codes) + 1}(实时身位-{current_shsz_rank}/{len(current_limit_up_datas)})" |
| | | return True, f"{tool.get_now_time_str()} {block}:top10涨停板块,主板开1({open_limit_up_codes}),属于主板前龙{len(open_limit_up_codes) + 1}(实时身位-{current_shsz_rank}:{front_current_shsz_rank_codes}/{len(current_limit_up_datas)})" |
| | | else: |
| | | if record_shsz_rank >= len(open_limit_up_codes) + 1: |
| | | cls.__remove_from_l2(code, f"{code}根据身位禁止买入:【{block}】历史身位{record_shsz_rank}") |