| | |
| | | # print(f"its_stock['list'][0] === {its_stock['list'][0]}") |
| | | logger.info(f"its_stock['list'] ===》》 {its_stock['list']}") |
| | | # logger.info(f"its_stock['list'][0] === {its_stock['list'][0]}") |
| | | its_stock_list_info = its_stock['list'][0] |
| | | |
| | | its_stock_list_info = its_stock['list'] |
| | | logger.info(f"its_stock_list_info==={its_stock_list_info}") |
| | | # 将板块强度下面对应的个股列表打印到日志中 |
| | | # for i in its_stock_list_info: |
| | | # if i[0] != 1: |
| | |
| | | # now = time.time() |
| | | # print(f"kpl_limit_up_process开始了{now}") |
| | | start_time = time.time() |
| | | its_stock_power = get_market_sift_plate_its_stock_power() |
| | | time_str = datetime.datetime.now().strftime("%H%M%S") |
| | | if 92900 < int(time_str) < 95000: |
| | | logger_kpl_jingxuan_in.info(f"耗时:{time.time() - start_time} 数据:{its_stock_power}") |
| | | callback(its_stock_power) |
| | | # print(f"精选板块拉升个股更新===={its_stock_power}") |
| | | now_time = tool.get_now_time_str() |
| | | if data_cache.L1_DATA_START_TIME < now_time < data_cache.CLOSING_TIME: |
| | | its_stock_power = get_market_sift_plate_its_stock_power() |
| | | time_str = datetime.datetime.now().strftime("%H%M%S") |
| | | if 92900 < int(time_str) < 95000: |
| | | logger_kpl_jingxuan_in.info(f"耗时:{time.time() - start_time} 数据:{its_stock_power}") |
| | | callback(its_stock_power) |
| | | # print(f"精选板块拉升个股更新===={its_stock_power}") |
| | | except Exception as e: |
| | | logger.error(f"开盘啦板块强度线程报错An error occurred: {e}") |
| | | finally: |
| | |
| | | # 获取大盘综合强度分数 |
| | | data_cache.real_time_market_strong = get_market_strong() |
| | | # data_cache.time_sharing_market_strong_dirt = time_sharing_market_strong_dirt.update({now: data_cache.real_time_market_strong}) |
| | | logger.info(f"大盘行情情绪综合强度 [分数]==={data_cache.real_time_market_strong}分") |
| | | # 该logger.info的的日志不再需要打印,后续将转入到GUI客户端上直接显示,该数据的打印交由下方的打印机制异步执行单独存储,以便后续可视化呈现后进行更高效的数据分析 |
| | | # logger.info(f"大盘行情情绪综合强度 [分数]==={data_cache.real_time_market_strong}分") |
| | | # 大盘综合强度分数 的 异步日志 |
| | | logger_Overall_market_strength_score.info(data_cache.real_time_market_strong) |
| | | async_log_util.info(logger_Overall_market_strength_score, f"大盘行情情绪综合强度 [分数]==={data_cache.real_time_market_strong}分") |
| | | # logger_Overall_market_strength_score.info(data_cache.real_time_market_strong) |
| | | async_log_util.info(logger_Overall_market_strength_score, f"{data_cache.real_time_market_strong}") |
| | | |
| | | usefulMoney = data_cache.account_finance_dict[0].get('usefulMoney', 0) |
| | | logger.info(f"账户可用资金==={usefulMoney}元") |
| | |
| | | low_emotion_mood_ratio = 1 |
| | | # 33分是个两级分化阶梯不好,目前不好拿捏,暂时不用 |
| | | # if data_cache.real_time_market_strong <= 33: |
| | | if data_cache.real_time_market_strong <= 20: |
| | | if data_cache.real_time_market_strong < 30: |
| | | low_emotion_mood_ratio = 0.1 |
| | | if data_cache.real_time_market_strong <= 10: |
| | | low_emotion_mood_ratio = 0 |
| | |
| | | |
| | | |
| | | if __name__ == "__main__": |
| | | start_time = time.time() |
| | | get_market_sift_plate_its_stock_power() |
| | | print("耗时:", time.time() - start_time) |
| | | # start_time = time.time() |
| | | # get_market_sift_plate_its_stock_power() |
| | | # print("耗时:", time.time() - start_time) |
| | | get_market_sift_plate_its_stock_power_process(None) |