admin
2025-04-08 c2aec8ae6367a41bb3cf4176a95500d433b8450e
添加日志打印
2个文件已修改
9 ■■■■ 已修改文件
data_server.py 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
strategy/market_sentiment_analysis.py 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
data_server.py
@@ -313,6 +313,8 @@
                    result_str = json.dumps({"code": 1, "msg": "未上传金额"})
                    return
                money = int(money)
                logger_debug.info(f"设置开仓金额:{money}")
                data_cache.BUY_MONEY_PER_CODE = money
                result_str = json.dumps({"code": 0})
strategy/market_sentiment_analysis.py
@@ -617,6 +617,7 @@
                    data_cache.index_trend_expectation_score = index_trend_expectation()
                    logger.info(f"大盘指数情绪预期分数==={data_cache.index_trend_expectation_score}分")
                    print(f"大盘指数情绪预期分数==={data_cache.index_trend_expectation_score}分")
                    # # 目前大盘指数情绪预期分数 尚不科学 强制设置为初始0值
                    # index_trend_expectation_score = 0
@@ -640,14 +641,16 @@
                            logger.info(f"采用GUI设置方式=》今日计划下单金额:{data_cache.today_planned_order_amount}")
        except Exception as error:
            logger_common.exception(error)
            logger.error(f"获取实时大盘行情情绪综合强度[分数] 函数报错: {error}")
        finally:
            time.sleep(3)
if __name__ == '__main__':
    market_strong = kpl_api.get_market_strong()
    print(f"{market_strong}")
    # market_strong = kpl_api.get_market_strong()
    # print(f"{market_strong}")
    get_real_time_market_strong()
    # all_index_K_line_dict = get_index_K_line()
    # all_index_k_line_dict_write()