| | |
| | | __Buy1PriceManager = code_price_manager.Buy1PriceManager() |
| | | __AccountAvailableMoneyManager = AccountAvailableMoneyManager() |
| | | __TradeBuyDataManager = trade_data_manager.TradeBuyDataManager() |
| | | __LimitUpTimeManager = limit_up_time_manager.LimitUpTimeManager() |
| | | |
| | | # 获取代码评分 |
| | | @classmethod |
| | |
| | | # 当前涨停价,设置涨停时间 |
| | | logger_l2_process.info("开盘涨停:{}", code) |
| | | # 保存涨停时间 |
| | | limit_up_time_manager.LimitUpTimeManager().save_limit_up_time(code, "09:30:00") |
| | | cls.__LimitUpTimeManager.save_limit_up_time(code, "09:30:00") |
| | | |
| | | total_datas = local_today_datas[code] |
| | | # __start_time = l2_data_log.l2_time(code, round(t.time() * 1000) - __start_time, |
| | |
| | | volume_rate = code_volumn_manager.get_volume_rate(code) |
| | | volume_rate_index = code_volumn_manager.get_volume_rate_index(volume_rate) |
| | | # 计算分值 |
| | | limit_up_time = limit_up_time_manager.LimitUpTimeManager().get_limit_up_time_cache(code) |
| | | limit_up_time = cls.__LimitUpTimeManager.get_limit_up_time_cache(code) |
| | | if limit_up_time is None: |
| | | limit_up_time = tool.get_now_time_str() |
| | | # score = first_code_score_manager.get_score(code, volume_rate, limit_up_time, True) |
| | |
| | | if volumn_rate >= 1.3: |
| | | return False, False, "最大量比超过1.3不能买" |
| | | |
| | | limit_up_time = limit_up_time_manager.LimitUpTimeManager().get_limit_up_time_cache(code) |
| | | limit_up_time =cls.__LimitUpTimeManager.get_limit_up_time_cache(code) |
| | | if limit_up_time is not None: |
| | | limit_up_time_seconds = l2.l2_data_util.L2DataUtil.get_time_as_second( |
| | | limit_up_time) |
| | |
| | | 0, min_money_w) |
| | | if left_big_num > 0: |
| | | # 重新获取分数与分数索引 |
| | | limit_up_time = limit_up_time_manager.LimitUpTimeManager().get_limit_up_time_cache(code) |
| | | limit_up_time = cls.__LimitUpTimeManager.get_limit_up_time_cache(code) |
| | | if limit_up_time is None: |
| | | limit_up_time = tool.get_now_time_str() |
| | | score = first_code_score_manager.get_score(code, cls.volume_rate_info[code][0], limit_up_time, True, |
| | |
| | | buy_nums, buy_count, max_num_set_new, |
| | | cls.volume_rate_info[code][0]) |
| | | l2_log.debug(code, "__save_order_begin_data") |
| | | limit_up_time_manager.LimitUpTimeManager().save_limit_up_time(code, |
| | | total_datas[compute_index][ |
| | | "val"]["time"]) |
| | | cls.__LimitUpTimeManager.save_limit_up_time(code,total_datas[compute_index]["val"]["time"]) |
| | | l2_log.debug(code, "save_limit_up_time") |
| | | cls.__virtual_buy(code, buy_single_index, compute_index, capture_time) |
| | | l2_log.debug(code, "__virtual_buy") |