| | |
| | | import decimal |
| | | |
| | | from code_attribute import gpcode_manager |
| | | from log_module.log import logger_debug |
| | | from third_data.history_k_data_util import HistoryKDatasUtils |
| | | from utils import tool |
| | | |
| | |
| | | "%Y-%m-%d"), refer_index |
| | | |
| | | |
| | | def parse_max_volume_in_days(datas, max_day): |
| | | """ |
| | | 解析最近几天最大的量 |
| | | @param datas: |
| | | @param max_day: |
| | | @return: |
| | | """ |
| | | # 解析最近几天的最大量 |
| | | datas = datas[:max_day] |
| | | max_volume_info = None |
| | | for d in datas: |
| | | if max_volume_info is None: |
| | | max_volume_info = (d["volume"], d) |
| | | if d["volume"] > max_volume_info[0]: |
| | | max_volume_info = (d["volume"], d) |
| | | if max_volume_info: |
| | | return max_volume_info[0] |
| | | return None |
| | | |
| | | |
| | | # 返回:(60天最大量,昨日量,量参考日期,参考量据今交易日数) |
| | | def __parse_max_volume(code, datas, is_new_or_near_top=False): |
| | | max_volume = 0 |