| | |
| | | start_compute_index = transaction_index + 1 # max(transaction_index + 1, start_compute_index) |
| | | total_datas = local_today_datas.get(code) |
| | | |
| | | # h撤计算必须超过5s |
| | | if tool.trade_time_sub(total_datas[-1]["val"]["time"], total_datas[buy_single_index]["val"]) < 5: |
| | | l2_log.h_cancel_debug(code, "5s内囊括计算H撤") |
| | | return |
| | | # -----------------计算H上------------------- |
| | | watch_indexes_up = set() |
| | | for i in range(real_place_order_index - 1, start_compute_index + 1, -1): |
| | |
| | | else: |
| | | total_big_num -= canceled_data["val"]["num"] |
| | | total_big_num += val["num"] |
| | | # 获取当日的量比 |
| | | volume_rate = code_volumn_manager.get_volume_rate(code) |
| | | |
| | | fdata = {"code_info": (code, code_name), "total_num": total_nums, "finish_num": deal_or_cancel_num, |
| | | "buy1_money": output_util.money_desc(buy1_money), |
| | | "big_num_count": total_big_count, |
| | | "big_num_money": output_util.money_desc(total_big_num * float(limit_up_price) * 100), |
| | | "left_count": total_left_count, |
| | | "volume_rate": volume_rate, |
| | | "left_money": output_util.money_desc(total_left_num * float(limit_up_price) * 100)} |
| | | fdatas.append(fdata) |
| | | result = {"code": 0, "data": fdatas} |