| | |
| | | |
| | | |
| | | |
| | | |
| | | def set_current_info(current_infos): |
| | | logging.info(f"set_current_info进入") |
| | | try: |
| | | now_start = time.time() |
| | | now_time = datetime.datetime.now().strftime("%H:%M:%S") |
| | | if len(current_infos) == 0 and now_time > data_cache.L1_data_start_time: |
| | | print(f"9:15后 l1数据为空=l1_data_current_infos===={current_infos}") |
| | | # for i in current_infos: |
| | | # if i[0] == '000001': |
| | | # print(f"i===={i}") |
| | | get_all_stocks_current_open(current_infos) |
| | | get_all_stocks_current_high_and_low(current_infos) |
| | | for current_info in current_infos: |
| | | try: |
| | | if current_info is not None: |
| | | strategic_thread_manager(current_info) |
| | | except Exception as error: |
| | | logging.exception(error) |
| | | # print("异常:", current_info) |
| | | now_end: float = time.time() |
| | | start_to_end = now_end - now_start |
| | | print(f"运行中=={round(start_to_end, 2)} 秒") |
| | | # logger.info(f"运行中=={round(start_to_end, 2)}秒") |
| | | except Exception as error: |
| | | logging.exception(error) |
| | | finally: |
| | | pass |
| | | |
| | | |
| | | # 仅仅用于测试数据进入策略后的数据情况 |
| | | # get_current_info() |