admin
2025-02-26 9e3f067fa98bd658a9e3b33c52154112d2535231
bug修改
2个文件已修改
9 ■■■■ 已修改文件
log_module/log.py 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
strategy/buying_strategy.py 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
log_module/log.py
@@ -303,6 +303,10 @@
                   filter=lambda record: record["extra"].get("name") == "local_huaxin_l2_buy_no",
                   rotation="00:00", compression="zip", enqueue=True)
        logger.add(self.get_path("kpl", "jingxuan_in"),
                   filter=lambda record: record["extra"].get("name") == "kpl_jingxuan_in",
                   rotation="00:00", compression="zip", enqueue=True)
    def get_path(self, dir_name, log_name):
        path_str = "{}/{}/gp/{}/{}".format(constant.get_path_prefix(), constant.LOG_DIR, dir_name,
                                           log_name) + ".{time:YYYY-MM-DD}.log"
@@ -434,6 +438,8 @@
logger_local_huaxin_l1_trade_info = __mylogger.get_logger("local_huaxin_l1_trade_info")
logger_local_huaxin_l2_special_volume = __mylogger.get_logger("local_huaxin_l2_special_volume")
logger_kpl_jingxuan_in = __mylogger.get_logger("kpl_jingxuan_in")
def close_print():
    logging.basicConfig(level=logging.ERROR)
strategy/buying_strategy.py
@@ -9,6 +9,7 @@
# from datetime import timedelta
import time
import utils.tool
from log_module.log import logger_kpl_jingxuan_in
# import dateutil
# 引入掘金API
# from gm.api import *
@@ -428,7 +429,7 @@
                                            f"【{k_line_data[0]['sec_name']}】--------------------------------------------------------------------------------------------------------[有强度视界]")
                                        logger.info(
                                            f"【无概念 有强度】出现在板块强度大于2的列表中!瞬时量幅比:{round(last_volume_to_growth_ratio, 2)}%,最新价: {current_price},瞬时涨幅:{round(tick_growth, 2)}%,当日当时涨幅:{today_growth}%,当前时间:{current_created_at}。")
                                        logger.info(
                                        logger_kpl_jingxuan_in.info(
                                            f"【强度数据】  ==  {data_cache.market_sift_plate_stock_dict}")
                                        strength_plate_set = set(strength_plate)
                                        intersection_plate = bought_plate_set.intersection(strength_plate_set)