| | |
| | | code_volumn_manager.CodeVolumeManager().get_volume_rate_refer_in_5days( |
| | | code), |
| | | refer_sell_money, |
| | | for_buy=True) |
| | | for_buy=True, is_almost_open_limit_up=radical_data[5]) |
| | | # 缺乏的大单金额 |
| | | lack_money = big_order_deal_enough_result[3] |
| | | # 如果有大单成交就不需要看大单 |
| | |
| | | else: |
| | | async_log_util.info(logger_l2_radical_buy, |
| | | f"即将炸板:{code}-{is_almost_open_limit_up}-{l2_market_time_str}") |
| | | if is_almost_open_limit_up: |
| | | # 自由流通市值50亿以上的不处理 |
| | | zyltgb = global_util.zyltgb_map.get( |
| | | code) |
| | | if zyltgb and zyltgb > 50e8: |
| | | return |
| | | |
| | | deal_codes = RadicalBuyDealCodesManager().get_deal_codes() |
| | | # 判断今日扫入的代码数量是否大于阈值 |
| | | radical_buy_setting = BuyMoneyAndCountSetting().get_radical_buy_setting() |
| | |
| | | latest_deal_time = l2_market_time_str |
| | | RadicalBuyDealCodesManager.buy_by_l2_delegate_expire_time_dict[code] = ( |
| | | time.time() + 60, latest_buy_no, buy_blocks, |
| | | latest_deal_time, buy_blocks_with_money) |
| | | latest_deal_time, buy_blocks_with_money, is_almost_open_limit_up) |
| | | return False |
| | | else: |
| | | async_log_util.info(logger_l2_radical_buy, f"不能下单:{code}-{result_by_volume}") |
| | |
| | | return total_lack_money, deal_big_order_money, TOTAL_BIG_DEAL_MONEY_THRESHOLD_MONEY |
| | | |
| | | |
| | | def is_big_order_deal_enough(code, volume_rate, refer_total_sell_money, for_buy=False): |
| | | def is_big_order_deal_enough(code, volume_rate, refer_total_sell_money, for_buy=False, is_almost_open_limit_up=False): |
| | | """ |
| | | 大单成交是否足够 |
| | | @param is_almost_open_limit_up: 是否是板上放量买入 |
| | | @param refer_total_sell_money: 引用的总卖额 |
| | | @param code: |
| | | @param volume_rate: |
| | |
| | | if before_time: |
| | | current_threshold_count = int(round(0.4 * money_y * 1.5)) |
| | | |
| | | # 是不是板上放量 |
| | | if is_almost_open_limit_up: |
| | | # 自由流通市值50亿以上的不处理 |
| | | zyltgb = global_util.zyltgb_map.get( |
| | | code) |
| | | if zyltgb and zyltgb > 50e8: |
| | | # 需要4倍均大单 |
| | | current_threshold_count = 4 |
| | | |
| | | if not is_first_limit_up_buy(code): |
| | | # 如果是回封下单阈值就采用均大单 |
| | | THRESHOLD_MONEY, is_temp_threshold_money = BeforeSubDealBigOrderManager().get_big_order_threshold_info(code) |
| | |
| | | __redis_manager = redis_manager.RedisManager(2) |
| | | __deal_codes_cache = set() |
| | | __instance = None |
| | | # 根据L2数据来激进买入的有效时间:{"code":(有效截至时间, 买单号, 扫入的板块, 最近成交时间)} |
| | | # 根据L2数据来激进买入的有效时间:{"code":(有效截至时间, 买单号, 扫入的板块, 最近成交时间, 买入板块净流入情况, 是否是板上放量买入)} |
| | | buy_by_l2_delegate_expire_time_dict = {} |
| | | # 仅仅买的板块 |
| | | __radical_buy_blocks_dict = {} |