| | |
| | | return True, "炸板后,60分钟内都未回封" |
| | | if now_rate <= 6: |
| | | return True, "炸板后,涨幅小于6%" |
| | | # TODO 是否有同概念的票已经买入成功 |
| | | blocks = block_info.get_code_blocks(code) |
| | | if blocks and len(blocks) == 1: |
| | | codes = block_info.get_block_codes(blocks[0]) |
| | |
| | | from db import redis_manager_delegate as redis_manager |
| | | from third_data.code_plate_key_manager import CodePlateKeyBuyManager |
| | | from trade import trade_manager, trade_queue_manager, l2_trade_factor, l2_trade_util, \ |
| | | trade_result_manager, first_code_score_manager, current_price_process_manager, trade_data_manager, trade_huaxin |
| | | from l2 import safe_count_manager, l2_data_manager, l2_data_log, l2_log, l2_data_source_util, code_price_manager, \ |
| | | trade_result_manager, current_price_process_manager, trade_data_manager, trade_huaxin |
| | | from l2 import safe_count_manager, l2_data_manager, l2_log, l2_data_source_util, code_price_manager, \ |
| | | transaction_progress |
| | | from l2.cancel_buy_strategy import SecondCancelBigNumComputer, HourCancelBigNumComputer, L2LimitUpMoneyStatisticUtil, \ |
| | | L2LimitUpSellStatisticUtil, DCancelBigNumComputer, LCancelBigNumComputer |
| | | from l2.cancel_buy_strategy import SecondCancelBigNumComputer, HourCancelBigNumComputer, DCancelBigNumComputer, LCancelBigNumComputer |
| | | from l2.l2_data_manager import L2DataException, TradePointManager |
| | | from l2.l2_data_util import local_today_datas, L2DataUtil, local_today_num_operate_map, local_today_buyno_map, \ |
| | | local_latest_datas |
| | | import l2.l2_data_util |
| | | from log_module.log import logger_l2_trade_buy, logger_l2_process, \ |
| | | logger_place_order_score, logger_l2_error, logger_profile, logger_debug |
| | | from log_module.log import logger_l2_trade_buy, logger_l2_process, logger_l2_error, logger_profile, logger_debug |
| | | |
| | | # TODO l2数据管理 |
| | | from trade.trade_data_manager import CodeActualPriceProcessor |
| | | |
| | | from line_profiler import LineProfiler |
| | |
| | | # 数据重复次数默认为1 |
| | | datas.append({"key": key, "val": item, "re": 1}) |
| | | dataIndexs.setdefault(key, len(datas) - 1) |
| | | # TODO 测试的时候开启,方便记录大单数据 |
| | | # 测试的时候开启,方便记录大单数据 |
| | | # l2_data_util.save_big_data(code, same_time_num, data) |
| | | return datas |
| | | |
| | |
| | | |
| | | |
| | | # 保存l2最新数据的大小 |
| | | # TODO 测试数据 |
| | | # @async_call |
| | | def save_l2_latest_data_number(code, num): |
| | | RedisUtils.setex(l2_data_manager._redisManager.getRedis(), "l2_latest_data_num-{}".format(code), 3, num) |
| | |
| | | return None |
| | | |
| | | |
| | | # l2数据拼接工具 TODO 暂时还未启用 |
| | | # l2数据拼接工具 暂时还未启用 |
| | | class L2DataConcatUtil: |
| | | |
| | | # 初始化 |
| | |
| | | code_name = "" |
| | | for res in ocr_results: |
| | | code_name += res[0] |
| | | # TODO 根据代码名称获取代码 |
| | | # 根据代码名称获取代码 |
| | | code = ths_industry_util.get_code_by_name(code_name) |
| | | # 图像识别 |
| | | return_str = json.dumps({"code": 0, "data": {"code": code}}) |
| | |
| | | if key not in self.l2_data_error_dict or round( |
| | | time.time() * 1000) - self.l2_data_error_dict[key] > 10000: |
| | | # self.l2CodeOperate.repaire_l2_data(code) |
| | | # todo 太敏感移除代码 |
| | | logger_l2_error.warning("code-{} l2单价错误:{}", code, l.msg) |
| | | # 单价不一致时需要移除代码重新添加 |
| | | l2_code_operate.L2CodeOperate().remove_l2_listen(code, "l2监听单价错误") |