| | |
| | | # yesterday 昨天的量 |
| | | import json |
| | | |
| | | from code_attribute import gpcode_manager |
| | | from code_attribute import gpcode_manager, code_nature_analyse |
| | | from db.redis_manager_delegate import RedisUtils |
| | | from log_module import async_log_util |
| | | from utils import global_util, tool |
| | |
| | | auto_free=False) |
| | | |
| | | def get_max_volume_in_5days(self, code): |
| | | """ |
| | | 5日最大量 |
| | | @param code: |
| | | @return: |
| | | """ |
| | | return self.__max_volume_in_5days.get(code) |
| | | |
| | | def get_radical_buy_refer_volume(self, code, limit_up_price): |
| | | """ |
| | | 获取扫入的参考量: |
| | | 参考额小于3.14亿就取90天参考量 |
| | | 否则就取最近5天的参考量 |
| | | @param code: |
| | | @param limit_up_price: |
| | | @return: |
| | | """ |
| | | # 60个交易日未涨停取 |
| | | k_format = code_nature_analyse.CodeNatureRecordManager().get_k_format_cache(code) |
| | | has_limit_up_in_60 = True |
| | | if k_format and not k_format[13]: |
| | | has_limit_up_in_60 = False |
| | | volume = self.get_max_volume_in_5days(code) |
| | | if volume * limit_up_price >= 3.14e8 and has_limit_up_in_60: |
| | | return volume |
| | | return int(self.get_reference_volume_as_money_y(code) * 1e8 / limit_up_price) |
| | | |
| | | def get_volume_rate_refer_in_5days(self, code, total_sell_volume=0): |
| | | """ |
| | | 获取今日量与5日最大量的参考值 |
| | | @param total_sell_volume: 当前总卖量 |
| | | @param code: |
| | | @return: |
| | | @return: 5日量比 |
| | | """ |
| | | max_volume = self.get_max_volume_in_5days(code) |
| | | if not max_volume: |