| | |
| | | from third_data.kpl_data_constant import LimitUpDataConstant, LimitUpCodesBlockRecordManager |
| | | from trade.buy_radical import radical_buy_data_manager, block_special_codes_manager |
| | | from trade.buy_radical.block_special_codes_manager import BlockSpecialCodesManager |
| | | from trade.buy_radical.radical_buy_data_manager import RadicalBuyBlockManager |
| | | from trade.buy_radical.radical_buy_data_manager import RadicalBuyBlockManager, TotalDealBigOrderThresholdMoneyManager |
| | | from trade.trade_data_manager import RadicalBuyDealCodesManager |
| | | from utils import tool, global_util |
| | | |
| | |
| | | price = transaction_datas[-1][1] |
| | | huaxin_timestamp = transaction_datas[-1][3] |
| | | |
| | | # 判断是否可以扫入 |
| | | can_direct_buy = False |
| | | human_setting_money = TotalDealBigOrderThresholdMoneyManager().get_money_cache(code) |
| | | if human_setting_money: |
| | | can_direct_buy = True |
| | | |
| | | # 获取参考总卖额 |
| | | refer_sell_data = L2MarketSellManager().get_refer_sell_data(code, l2_huaxin_util.convert_time( |
| | | huaxin_timestamp)) |
| | |
| | | # 要求的大单够了 以后,回封买,只要有两个大单成交了,立即下单 |
| | | THRESHOLD_MONEY, is_temp_threshold_money = radical_buy_data_manager.BeforeSubDealBigOrderManager().get_big_order_threshold_info( |
| | | code) |
| | | if big_order_money > THRESHOLD_MONEY * 2: |
| | | if big_order_money > THRESHOLD_MONEY * 2 and can_direct_buy: |
| | | return BUY_MODE_DIRECT, f"有两个以上大单瞬时成交({big_order_money}/{THRESHOLD_MONEY * 2}), 大单足够" |
| | | |
| | | if big_order_count >= 2: |
| | |
| | | if threshold_left_sell_money > left_limit_up_sell_money: |
| | | # 剩余总卖小于均大单才能下单 |
| | | # 如果是深证且卖一大于5000w可不判断大单是否满足 |
| | | if tool.is_sz_code(code) and refer_sell_money >= 5e7: |
| | | if tool.is_sz_code(code) and refer_sell_money >= 5e7 and can_direct_buy: |
| | | return BUY_MODE_DIRECT, f"剩余涨停总卖额-{left_limit_up_sell_money},均大单-{average_big_order_money}, 剩余阈值-{threshold_left_sell_money}, 总抛压大({refer_sell_money})" |
| | | else: |
| | | if total_lack_money_info[0] <= 0 and tool.is_sz_code(code): |
| | | if total_lack_money_info[0] <= 0 and tool.is_sz_code(code) and can_direct_buy: |
| | | return BUY_MODE_DIRECT, f"剩余涨停总卖额-{left_limit_up_sell_money},均大单-{average_big_order_money}, 大单足够" |
| | | else: |
| | | average_big_order_money = 0 |