| | |
| | | from cancel_strategy.s_l_h_cancel_strategy import SCancelBigNumComputer |
| | | from l2.huaxin import l2_huaxin_util |
| | | from l2.l2_data_manager import OrderBeginPosInfo |
| | | from l2.l2_transaction_data_manager import HuaXinSellOrderStatisticManager |
| | | from l2 import l2_data_util, cancel_buy_strategy |
| | | from l2.place_order_single_data_manager import L2TradeSingleDataProcessor |
| | | from l2 import l2_data_util |
| | | from l2.l2_transaction_data_processor import HuaXinTransactionDatasProcessor |
| | | from log_module import log_export, async_log_util |
| | | from utils import tool |
| | | |
| | |
| | | |
| | | if big_sell_order_info[1] and big_sell_order_info[1][-1][0] == 559018: |
| | | print(big_sell_order_info) |
| | | cancel_buy_strategy.SCancelBigNumComputer().set_real_place_order_index(code, 208, False) |
| | | cancel_buy_strategy.SCancelBigNumComputer().set_big_sell_order_info_for_cancel(code, big_sell_order_info, |
| | | OrderBeginPosInfo( |
| | | mode=OrderBeginPosInfo.MODE_ACTIVE, |
| | | buy_single_index=0, |
| | | buy_exec_index=13)) |
| | | SCancelBigNumComputer().set_real_place_order_index(code, 208, False) |
| | | SCancelBigNumComputer().set_big_sell_order_info_for_cancel(code, big_sell_order_info, |
| | | OrderBeginPosInfo( |
| | | mode=OrderBeginPosInfo.MODE_ACTIVE, |
| | | buy_single_index=0, |
| | | buy_exec_index=13)) |
| | | # if big_sell_order_info[0] < 50 * 10000: |
| | | # continue |
| | | # print(i, sum([x[1] * x[2] for x in big_sell_order_info[1]]), big_sell_order_info) |
| | |
| | | |
| | | def test_process_transaction_datas(): |
| | | data_map = log_export.load_huaxin_transaction_map(date="2024-04-17") |
| | | code = "002376" |
| | | code = "000035" |
| | | datas = data_map.get(code) |
| | | l2_data_util.load_l2_data(code) |
| | | |
| | | L2TradeSingleDataProcessor.add_l2_delegate_limit_up_sell(code, {"val": {"orderNo": 123123}, "index": 123}) |
| | | |
| | | for data in datas: |
| | | L2TradeSingleDataProcessor.process_passive_limit_up_sell_data(code, data, 5.78) |
| | | HuaXinTransactionDatasProcessor.statistic_big_order_infos(code, data) |
| | | |
| | | async_log_util.run_sync() |
| | | |
| | | # L2TradeSingleDataProcessor.add_l2_delegate_limit_up_sell(code, {"val": {"orderNo": 123123}, "index": 123}) |
| | | # |
| | | # for data in datas: |
| | | # L2TradeSingleDataProcessor.process_passive_limit_up_sell_data(code, data, 5.78) |
| | | |
| | | |
| | | if __name__ == '__main__': |
| | |
| | | # if real_order_time_ms: |
| | | # if tool.trade_time_sub_with_ms(deal_time, real_order_time_ms) >= 0: |
| | | # print("123123") |
| | | test_process_transaction_datas() |
| | | # test_process_transaction_datas() |
| | | # BigOrderDealManager() |
| | | pass |