| | |
| | | params["trade_data"]["trade_progress"] = trade_progress_datas |
| | | |
| | | # 买入信号 |
| | | buy_single_index, buy_exec_index, compute_index, num, count, max_num_set, volume_rate = l2_data_manager.TradePointManager().get_buy_compute_start_data_cache( |
| | | order_begin_pos = l2_data_manager.TradePointManager().get_buy_compute_start_data_cache( |
| | | code) |
| | | |
| | | if buy_single_index is None: |
| | | if order_begin_pos.buy_single_index is None: |
| | | # buy_params_info.append("无信号") |
| | | pass |
| | | else: |
| | | data = total_datas[buy_single_index] |
| | | data = total_datas[order_begin_pos.buy_single_index] |
| | | params["trade_data"]["buy_single"] = {"time": data['val']['time'], "num": data['val']['num'], |
| | | "money": round(data['val']['num'] * float( |
| | | data['val']['price']) * 100 / 10000, 1)} |
| | | |
| | | if buy_exec_index is None or buy_exec_index < 0: |
| | | if order_begin_pos.buy_exec_index is None or order_begin_pos.buy_exec_index < 0: |
| | | # buy_params_info.append("未下单") |
| | | pass |
| | | else: |
| | | data = total_datas[buy_exec_index] |
| | | data = total_datas[order_begin_pos.buy_exec_index] |
| | | params["trade_data"]["buy_exec"] = {"time": data['val']['time'], "num": data['val']['num'], |
| | | "money": round(data['val']['num'] * float( |
| | | data['val']['price']) * 100 / 10000, 1)} |