| | |
| | | from third_data.history_k_data_util import JueJinApi |
| | | from trade import trade_manager, l2_trade_util, \ |
| | | trade_data_manager, trade_constant, radical_buy_strategy, radical_buy_data_manager |
| | | from trade.buy_money_count_setting import BuyMoneyAndCountSetting |
| | | from trade.buy_money_count_setting import BuyMoneyAndCountSetting, BuyMoneyUtil |
| | | |
| | | from trade.huaxin import huaxin_trade_api as trade_api, huaxin_trade_api, huaxin_trade_data_update, \ |
| | | huaxin_trade_record_manager, huaxin_sell_util |
| | |
| | | # 判断昨日是否涨停过 |
| | | async_log_util.info(logger_l2_radical_buy, f"涨停主动买:{code}-{transaction_datas[-1]}") |
| | | deal_codes = RadicalBuyDealCodesManager().get_deal_codes() |
| | | # 判断今日扫入的代码数量是否大于阈值 |
| | | radical_buy_setting = BuyMoneyAndCountSetting().get_radical_buy_setting() |
| | | MAX_COUNT = 4 if radical_buy_setting is None else radical_buy_setting[0] |
| | | if len(deal_codes) >= MAX_COUNT: |
| | |
| | | except Exception as e: |
| | | logger_debug.exception(e) |
| | | |
| | | # 判断当前时间段是否可以买入 |
| | | mode = OrderBeginPosInfo.MODE_RADICAL |
| | | can_buy, money, msg = BuyMoneyUtil.get_buy_data(tool.get_now_time_str(), mode, |
| | | DealAndDelegateWithBuyModeDataManager().get_deal_codes_info( |
| | | mode), |
| | | DealAndDelegateWithBuyModeDataManager().get_delegates_codes_info( |
| | | mode)) |
| | | if not can_buy: |
| | | async_log_util.info(logger_l2_radical_buy, f"当前时间段已不能扫入:{msg}") |
| | | return |
| | | |
| | | # -----根据成交比例判断是否可买------ |
| | | result_by_volume = radical_buy_strategy.limit_up_active_buy_deal(code, transaction_datas) |
| | | async_log_util.info(logger_l2_radical_buy, f"量买入结果判断:{code}, 结果:{result_by_volume} 板块:{buy_blocks}") |