| | |
| | | from trade.huaxin import huaxin_trade_api as trade_api, huaxin_trade_api, huaxin_trade_data_update, \ |
| | | huaxin_trade_record_manager, huaxin_sell_util |
| | | from api.outside_api_command_callback import OutsideApiCommandCallback |
| | | from trade.radical_buy_data_manager import RedicalBuyDataManager |
| | | from trade.sell.sell_rule_manager import TradeRuleManager |
| | | from trade.trade_data_manager import RadicalBuyDealCodesManager |
| | | from trade.trade_manager import CodesTradeStateManager |
| | |
| | | need_cancel, rule_id = DCancelBigNumComputer().need_cancel(code, buy_1_volume) |
| | | if need_cancel: |
| | | try: |
| | | l2_data_manager_new.L2TradeDataProcessor.cancel_buy(code, f"盯封单撤:{time_str}-{buy_1_volume}", cancel_type=trade_constant.CANCEL_TYPE_D) |
| | | l2_data_manager_new.L2TradeDataProcessor.cancel_buy(code, f"盯封单撤:{time_str}-{buy_1_volume}", |
| | | cancel_type=trade_constant.CANCEL_TYPE_D) |
| | | finally: |
| | | TradeRuleManager().excuted(rule_id) |
| | | except Exception as e: |
| | |
| | | async_log_util.info(logger_l2_radical_buy, f"该代码已经成交:{code}") |
| | | return |
| | | |
| | | k_format = code_nature_analyse.CodeNatureRecordManager().get_k_format_cache(code) |
| | | if k_format and k_format[13] and not k_format[14]: |
| | | can_buy_result = RedicalBuyDataManager.can_buy(code) |
| | | if can_buy_result[0]: |
| | | # 获取激进买的板块 |
| | | result_cache = self.__radical_buy_by_blocks_result_cache.get(code) |
| | | if not result_cache or result_cache[0] < time.time(): |
| | |
| | | time.time() + 3, buy_no) |
| | | else: |
| | | volume_rate = code_volumn_manager.get_volume_rate(code) |
| | | async_log_util.info(logger_l2_radical_buy, f"图形不符合要求:{code},量比:{volume_rate}") |
| | | async_log_util.info(logger_l2_radical_buy, f"没有可扫入的板块:{code},量比:{volume_rate}") |
| | | else: |
| | | async_log_util.info(logger_l2_radical_buy, f"目前代码不可交易:{code}-{can_buy_result[1]}") |
| | | except Exception as e: |
| | | async_log_util.info(logger_debug, f"激进买计算异常:{str(e)}") |
| | | |