| | |
| | | import dask |
| | | |
| | | from l2 import l2_data_manager |
| | | from l2.cancel_buy_strategy import HourCancelBigNumComputer, SecondCancelBigNumComputer, L2LimitUpSellStatisticUtil |
| | | from l2.cancel_buy_strategy import HourCancelBigNumComputer, SecondCancelBigNumComputer, L2LimitUpSellStatisticUtil, \ |
| | | LCancelBigNumComputer |
| | | from l2.l2_data_util import local_today_datas, local_today_num_operate_map |
| | | from l2.safe_count_manager import BuyL2SafeCountManager |
| | | from log import logger_l2_error |
| | |
| | | logging.exception(e) |
| | | logger_l2_error.exception(e) |
| | | |
| | | buy_single_index, buy_exec_index, buy_compute_index, num, count, max_num_set,volume_rate = l2_data_manager.TradePointManager.get_buy_compute_start_data( |
| | | @dask.delayed |
| | | def l_cancel(code): |
| | | try: |
| | | LCancelBigNumComputer.del_watch_index(code) |
| | | except Exception as e: |
| | | logging.exception(e) |
| | | logger_l2_error.exception(e) |
| | | |
| | | buy_single_index, buy_exec_index, buy_compute_index, num, count, max_num_set, volume_rate = l2_data_manager.TradePointManager.get_buy_compute_start_data( |
| | | code) |
| | | |
| | | f1 = clear_max_buy1_volume(code) |
| | | f2 = safe_count(code, buy_single_index, buy_exec_index) |
| | | f3 = h_cancel(code, buy_single_index, buy_exec_index) |
| | | dask.compute(f1, f2, f3) |
| | | f4 = l_cancel(code) |
| | | dask.compute(f1, f2, f3, f4) |
| | | l2_data_manager.TradePointManager.delete_buy_cancel_point(code) |
| | | |
| | | |