From e155f71d1fda90ecf5ffc5bc9b4baeb06579ddbe Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 28 八月 2025 15:06:53 +0800 Subject: [PATCH] 委托列表输出量比/动态L后撤单比例修改/最大单价买到250/参考量不取最近5个交易日最大/下午1点过后不自动加想 --- code_attribute/code_volumn_manager.py | 38 +++++++++++++++++++++----------------- 1 files changed, 21 insertions(+), 17 deletions(-) diff --git a/code_attribute/code_volumn_manager.py b/code_attribute/code_volumn_manager.py index afeec39..9439ff8 100644 --- a/code_attribute/code_volumn_manager.py +++ b/code_attribute/code_volumn_manager.py @@ -96,13 +96,13 @@ @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 and volume * limit_up_price >= 9e8 and has_limit_up_in_60: - return volume + # 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 and volume * limit_up_price >= 9e8 and has_limit_up_in_60: + # return volume return int(self.get_reference_volume_as_money_y(code) * 1e8 / limit_up_price) def get_radical_buy_refer_volume_info(self, code, limit_up_price): @@ -116,14 +116,14 @@ @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 + # 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_info = self.__max_volume_info_in_5days.get(code, None) - if volume_info and volume_info[0] * limit_up_price >= 9e8 and has_limit_up_in_60: - return volume_info + # volume_info = self.__max_volume_info_in_5days.get(code, None) + # if volume_info and volume_info[0] * limit_up_price >= 9e8 and has_limit_up_in_60: + # return volume_info return self.get_reference_volume_info(code) def get_volume_rate_refer_in_5days(self, code, total_sell_volume=0): @@ -136,7 +136,7 @@ max_volume = self.get_max_volume_in_5days(code) if not max_volume: return 0 - today_volume = self.get_today_volumn(code) + today_volume = self.get_today_volumn_cache(code) return round((today_volume + total_sell_volume) / max_volume, 2) # 鑾峰彇鍘嗗彶閲� @@ -184,16 +184,20 @@ _volumn = global_util.today_volumn.get(code) if _volumn is None: _volumn = RedisUtils.get(self.__redis_manager.getRedis(), "volumn_today-{}".format(code)) + if not _volumn: + _volumn = 0 return int(_volumn) # 鑾峰彇浠婃棩閲� def get_today_volumn_cache(self, code): - return global_util.today_volumn.get(code) + if code in global_util.today_volumn: + return global_util.today_volumn.get(code) + return 0 # 鑾峰彇閲忔瘮锛堜粖鏃ラ噺/max(60澶╂渶澶ч噺,鏄ㄦ棩閲�)锛� # 灏嗘�诲崠閲忚绠楀湪鍐� def get_volume_rate(self, code, total_sell_volume=0, with_info=False): - today = self.get_today_volumn(code) + today = self.get_today_volumn_cache(code) max60, yesterday = self.get_histry_volumn(code) if today is None: today = 0 -- Gitblit v1.8.0