| | |
| | | class HuaXinTransactionDatasProcessor: |
| | | __statistic_thread_pool = concurrent.futures.ThreadPoolExecutor(max_workers=constant.HUAXIN_L2_MAX_CODES_COUNT + 2) |
| | | __TradeBuyQueue = transaction_progress.TradeBuyQueue() |
| | | # 非涨停成交时间 |
| | | __not_limit_up_time_dict = {} |
| | | |
| | | # 计算成交进度 |
| | | @classmethod |
| | |
| | | try: |
| | | current_price_process_manager.set_trade_price(code, fdatas[-1][0][1]) |
| | | if not fdatas[-1][2]: |
| | | # 没有涨停 |
| | | EveryLimitupBigDealOrderManager.open_limit_up(code, f"最新成交价:{fdatas[-1][0][1]}") |
| | | radical_buy_strategy.clear_data(code, msg=f"没有涨停:{fdatas[-1][0]}") |
| | | except: |
| | | pass |
| | | if code not in cls.__not_limit_up_time_dict: |
| | | cls.__not_limit_up_time_dict[code] = fdatas[-1][5] |
| | | last_time = cls.__not_limit_up_time_dict[code] |
| | | # 炸板时间持续500ms以上算炸板 |
| | | if tool.trade_time_sub_with_ms(fdatas[-1][5], last_time) > 500: |
| | | # 没有涨停 |
| | | EveryLimitupBigDealOrderManager.open_limit_up(code, f"最新成交价:{fdatas[-1][0][1]}") |
| | | radical_buy_strategy.clear_data(code, msg=f"没有涨停:{fdatas[-1][0]}") |
| | | else: |
| | | if code in cls.__not_limit_up_time_dict: |
| | | cls.__not_limit_up_time_dict.pop(code) |
| | | except Exception as e: |
| | | async_log_util.error(logger_debug, f"L2成交开板计算错误:{str(e)}") |
| | | |
| | | total_datas = l2_data_util.local_today_datas.get(code) |
| | | use_time_list = [] |
| | |
| | | _start_time = time.time() |
| | | |
| | | try: |
| | | last_data = fdatas[-1] |
| | | # 统计上板时间 |
| | | try: |
| | | for d in fdatas: |
| | | if d[1]: |
| | | # 主动买 |
| | | if d[2]: |
| | | # 涨停 |
| | | current_price_process_manager.set_latest_not_limit_up_time(code, d[5]) |
| | | else: |
| | | # 主动卖(板上) |
| | | if d[2]: |
| | | L2LimitUpSellDataManager.clear_data(code) |
| | | break |
| | | except: |
| | | pass |
| | | if last_data[1] and last_data[2]: |
| | | current_price_process_manager.set_latest_not_limit_up_time(code, last_data[5]) |
| | | if not last_data[1] and last_data[2]: |
| | | L2LimitUpSellDataManager.clear_data(code) |
| | | big_sell_order_info = None |
| | | # 统计卖单 |
| | | big_sell_order_info = HuaXinSellOrderStatisticManager.statistic_continue_limit_up_sell_transaction_datas( |