| | |
| | | pass |
| | | async_log_util.info(logger_l2_process, f"code:{code} 获取到下单真实位置:{place_order_index}") |
| | | |
| | | |
| | | # 处理涨停卖与涨停卖撤 |
| | | try: |
| | | for d in add_datas: |
| | |
| | | # if code.find('60') == 0: |
| | | # 激进买 |
| | | continue_count = 1 |
| | | has_single, _index, sell_info = cls.__compute_active_order_begin_pos(code, continue_count, compute_start_index, compute_end_index) |
| | | has_single, _index, sell_info = cls.__compute_active_order_begin_pos(code, continue_count, |
| | | compute_start_index, compute_end_index) |
| | | fast_msg = None |
| | | if has_single: |
| | | order_begin_pos.mode = OrderBeginPosInfo.MODE_ACTIVE |
| | |
| | | order_begin_pos.num, |
| | | order_begin_pos.count, |
| | | order_begin_pos.threshold_money, |
| | | order_begin_pos.buy_single_index, order_begin_pos.max_num_set,order_begin_pos.sell_info[1]) |
| | | order_begin_pos.buy_single_index, order_begin_pos.max_num_set, order_begin_pos.sell_info[1]) |
| | | threshold_money = threshold_money_new |
| | | order_begin_pos.threshold_money = threshold_money |
| | | elif order_begin_pos.mode == OrderBeginPosInfo.MODE_FAST: |
| | |
| | | if refer_sell_data is None: |
| | | refer_sell_data = (start_time_str, 0, 0, (round(float(total_datas[start_index]["val"]["price"]), 2), 0)) |
| | | l2_log.debug(code, f"丢失总卖额,设置默认为0,计算范围:{start_index}-{end_index}") |
| | | # 判断是否为真的板上放量 |
| | | single = place_order_single_data_manager.L2TradeSingleDataManager.get_valid_trade_single( |
| | | code, |
| | | tool.to_time_with_ms(total_datas[end_index]['val']['time'], total_datas[end_index]['val']['tms'])) |
| | | trade_price_info = HuaXinSellOrderStatisticManager.get_latest_trade_price_info(code) |
| | | limit_up_price = gpcode_manager.get_limit_up_price(code) |
| | | is_limit_up = False |
| | | if limit_up_price and trade_price_info and abs(trade_price_info[0] - float(limit_up_price)) < 0.001: |
| | | is_limit_up = True |
| | | if refer_sell_data[1] > 0 or single or not is_limit_up: |
| | | # 不是板上放量 |
| | | pass |
| | | else: |
| | | # 板上放量 |
| | | pass |
| | | |
| | | # 获取当前是否可激进买 |
| | | # 获取板块是否可以激进买 |
| | | # 可买的板块, 是否独苗, 消息, 可买的强势板块, 关键词, 激进买的板块 |
| | |
| | | # 有可买板块,有激进买板块 |
| | | # 第一步: 计算总卖额 |
| | | threshold_money, sell_1_price = refer_sell_data[1], refer_sell_data[3][0] |
| | | if code.find("60") == 0: |
| | | threshold_money = 0 |
| | | else: |
| | | pass |
| | | # for i in range(start_index - 1, -1, -1): |
| | | # val = total_datas[i]["val"] |
| | | # if tool.compare_time(val["time"], refer_sell_data[0]) < 0: |
| | | # # 将本s的计算上去 |
| | | # break |
| | | # if L2DataUtil.is_sell(val): |
| | | # threshold_money += val["num"] * int(float(val["price"]) * 100) |
| | | # elif L2DataUtil.is_sell_cancel(val): |
| | | # threshold_money -= val["num"] * int(float(val["price"]) * 100) |
| | | # elif L2DataUtil.is_buy(val): |
| | | # # 判断价格(大于卖1) 被买吃掉 |
| | | # if round(float(val["price"]), 2) - sell_1_price >= 0: |
| | | # threshold_money -= val["num"] * int(float(val["price"]) * 100) |
| | | # 第二步:计算起始信号 |
| | | second_930 = 9 * 3600 + 30 * 60 + 0 |
| | | total_datas = local_today_datas.get(code) |
| | |
| | | |
| | | threshold_money = threshold_money_origin |
| | | # 目标手数 |
| | | threshold_num = 0 # round(threshold_money / (limit_up_price * 100)) |
| | | threshold_num = 0 # round(threshold_money / (limit_up_price * 100)) |
| | | bigger_threshold_num = round(5000 / (limit_up_price)) |
| | | |
| | | # buy_single_time_seconds = L2DataUtil.get_time_as_second(total_datas[buy_single_index]["val"]["time"]) |
| | |
| | | elif code.find("00") == 0: |
| | | # 深证非板上放量 |
| | | safe_count = 2 |
| | | if code.find("60") == 0: |
| | | if code.find("60") == 0: |
| | | # 上证安全笔数为3 |
| | | safe_count = 3 |
| | | if buy_count < safe_count: |