| | |
| | | import datetime |
| | | import logging |
| | | import os |
| | | import shutil |
| | | |
| | |
| | | line = line[line.find("处理数据范围") + len("处理数据范围") + 1:line.find("处理时间")].strip() |
| | | if len(pos_list) == 0 or pos_list[-1][1] < int(line.split("-")[0]): |
| | | if int("093000") <= int(time_.replace(":", "")) <= int("150000"): |
| | | pos_list.append((int(line.split("-")[0]), int(line.split("-")[1]))) |
| | | try: |
| | | pos_list.append((int(line.split("-")[0]), int(line.split("-")[1]))) |
| | | except Exception as e: |
| | | logging.exception(e) |
| | | return pos_list |
| | | |
| | | |
| | |
| | | import time |
| | | |
| | | from l2 import cancel_buy_strategy |
| | | from l2.l2_data_manager import TradePointManager |
| | | from log_module import async_log_util |
| | | from log_module.log import hx_logger_trade_debug, logger_system |
| | | from trade import trade_huaxin, trade_manager |
| | |
| | | d['orderSysID'], |
| | | d['insertTime']) |
| | | if new_place_order_index: |
| | | buy_single_index, buy_exec_index, compute_index, num, count, max_num_set, volume_rate = TradePointManager().get_buy_compute_start_data_cache( |
| | | d['securityID']) |
| | | cancel_buy_strategy.set_real_place_position(d['securityID'], |
| | | new_place_order_index) |
| | | new_place_order_index, buy_single_index) |
| | | |
| | | |
| | | elif huaxin_util.is_canceled(d["orderStatus"]) or huaxin_util.is_deal( |
| | |
| | | |
| | | |
| | | if __name__ == "__main__": |
| | | export_l2_excel("600360", date="2023-09-11") |
| | | try: |
| | | export_l2_excel("600615") |
| | | except Exception as e: |
| | | logging.exception(e) |