| | |
| | | 统计大单成交 |
| | | @param code: |
| | | @param fdatas: 格式:[(数据本身, 是否主动买, 是否涨停, 总成交额, 不含ms时间,含ms时间)] |
| | | @return: |
| | | @return: 大买单列表,大卖单列表 |
| | | """ |
| | | |
| | | def statistic_big_buy_data(): |
| | |
| | | else: |
| | | buy_datas = statistic_big_buy_data() |
| | | sell_datas = statistic_big_sell_data() |
| | | return buy_datas, sell_datas |
| | | # L撤的比例与买卖大单无直接关系了 |
| | | # if buy_datas or sell_datas: |
| | | # buy_money = BigOrderDealManager().get_total_buy_money(code) |
| | |
| | | _start_time = time.time() |
| | | # 大单统计 |
| | | # cls.__statistic_thread_pool.submit(cls.statistic_big_order_infos, code, datas, order_begin_pos) |
| | | big_sell_list = [] |
| | | try: |
| | | cls.statistic_big_order_infos(code, fdatas, order_begin_pos) |
| | | big_buy_list, big_sell_list = cls.statistic_big_order_infos(code, fdatas, order_begin_pos) |
| | | except Exception as e: |
| | | async_log_util.error(hx_logger_l2_debug, f"统计大单出错:{str(e)}") |
| | | use_time_list.append(("统计大单数据", time.time() - _start_time)) |
| | |
| | | _start_time = time.time() |
| | | |
| | | if is_placed_order: |
| | | |
| | | LCancelBigNumComputer().set_big_sell_order_info(code, big_sell_order_info) |
| | | |
| | | # need_cancel, cancel_msg = SCancelBigNumComputer().set_big_sell_order_info_for_cancel(code, |
| | | # big_sell_order_info, |
| | | # order_begin_pos) |
| | | need_cancel, cancel_msg = False, "" |
| | | cancel_type = None |
| | | if need_cancel: |
| | | cancel_msg = f"S撤:{cancel_msg}" |
| | | cancel_type = trade_constant.CANCEL_TYPE_S |
| | | try: |
| | | can_cancel, cancel_data = LCancelBigNumComputer().add_big_sell_order_deal_list(code, big_sell_list) |
| | | if can_cancel: |
| | | need_cancel, cancel_msg = True, f"L后大卖单成交叠加触发撤单:{big_sell_list}" |
| | | except Exception as e: |
| | | async_log_util.error(logger_debug, f"L后大卖单成交叠加触发撤单:{str(e)}") |
| | | |
| | | if not need_cancel: |
| | | need_cancel, cancel_msg = FCancelBigNumComputer().need_cancel_for_p(code, |
| | | order_begin_pos) |
| | |
| | | big_sell_order_info = HuaXinSellOrderStatisticManager.statistic_continue_limit_up_sell_transaction_datas( |
| | | code, fdatas, |
| | | limit_up_price) |
| | | LCancelBigNumComputer().set_big_sell_order_info(code, big_sell_order_info) |
| | | need_cancel, cancel_msg = False, "" |
| | | cancel_type = None |
| | | if not need_cancel: |
| | |
| | | |
| | | @classmethod |
| | | def get_latest_transaction_data(cls, code): |
| | | return cls.__latest_transaction_data_dict.get(code) |
| | | return cls.__latest_transaction_data_dict.get(code) |