| | |
| | | def get_max_volume_in_5days(self, code): |
| | | return self.__max_volume_in_5days.get(code) |
| | | |
| | | def get_volume_rate_refer_in_5days(self, code): |
| | | """ |
| | | 获取今日量与5日最大量的参考值 |
| | | @param code: |
| | | @return: |
| | | """ |
| | | max_volume = self.get_max_volume_in_5days(code) |
| | | if not max_volume: |
| | | return 0 |
| | | today_volume = self.get_today_volumn(code) |
| | | return round(today_volume / max_volume, 2) |
| | | |
| | | # 获取历史量 |
| | | def get_histry_volumn(self, code): |
| | | max60 = global_util.max60_volumn.get(code) |
| | |
| | | DealAndDelegateWithBuyModeDataManager().get_delegates_codes_info( |
| | | mode)) |
| | | if not can_buy: |
| | | async_log_util.info(logger_l2_radical_buy, f"当前时间段已不能扫入:{msg}") |
| | | async_log_util.info(logger_l2_radical_buy, f"当前时间段已不能扫入:{code}-{msg}") |
| | | return |
| | | |
| | | # -----根据成交比例判断是否可买------ |
| | |
| | | import l2_data_util |
| | | from code_attribute import code_nature_analyse, code_volumn_manager, gpcode_manager |
| | | from code_attribute.code_l1_data_manager import L1DataManager |
| | | from code_attribute.code_volumn_manager import CodeVolumeManager |
| | | from db import redis_manager_delegate as redis_manager |
| | | from db.redis_manager_delegate import RedisUtils |
| | | from l2.l2_transaction_data_manager import BigOrderDealManager, HuaXinBuyOrderManager |
| | |
| | | history_index, history_before_codes_info = cls.__get_history_index(code, block, yesterday_limit_up_codes) |
| | | if history_index > 5: |
| | | return False, f"处于首板老{history_index + 1}" |
| | | if history_index >= 4: |
| | | # 判断量是否换够 |
| | | volume_rate = CodeVolumeManager().get_volume_rate_refer_in_5days(code) |
| | | if volume_rate < 0.8: |
| | | return False, f"处于首板老{history_index + 1},量比({volume_rate})<0.8" |
| | | |
| | | return True, f"处于首板老{history_index + 1}" |
| | | |
| | | @classmethod |
| | |
| | | if not can_buy_blocks: |
| | | msges.clear() |
| | | for b in keys_: |
| | | result = cls.__block_special_codes(code, b ,yesterday_limit_up_codes) |
| | | result = cls.__block_special_codes(code, b, yesterday_limit_up_codes) |
| | | if result[0]: |
| | | can_buy_blocks.add(b) |
| | | msges.append(f"【{b}】:{result[1]}") |