From 6f3c0956667cb4383151bdc1d3a7f31f2d048bda Mon Sep 17 00:00:00 2001
From: admin <admin@example.com>
Date: 星期五, 28 三月 2025 16:22:25 +0800
Subject: [PATCH] bug修改

---
 strategy/kpl_api.py |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/strategy/kpl_api.py b/strategy/kpl_api.py
index 4c5b33c..a87bfd5 100644
--- a/strategy/kpl_api.py
+++ b/strategy/kpl_api.py
@@ -770,24 +770,27 @@
 
                     data_cache.index_trend_expectation_score = index_trend_expectation()
                     logger.info(f"澶х洏鎸囨暟鎯呯华棰勬湡鍒嗘暟==={data_cache.index_trend_expectation_score}鍒�")
-                    # 鐩墠澶х洏鎸囨暟鎯呯华棰勬湡鍒嗘暟 灏氫笉绉戝 寮哄埗璁剧疆涓哄垵濮�0鍊�
-                    index_trend_expectation_score = 0
+                    # # 鐩墠澶х洏鎸囨暟鎯呯华棰勬湡鍒嗘暟 灏氫笉绉戝 寮哄埗璁剧疆涓哄垵濮�0鍊�
+                    # index_trend_expectation_score = 0
 
                     # 鑾峰彇璁$畻浠婂ぉ鏂板鐨勬寔浠撴暟閲�
                     addition_position_number = len(data_cache.addition_position_symbols_set)
                     # 瀹氫箟涓�涓粖鏃ョ殑鍓╀綑鏂板鎸佷粨鏁伴噺鐨勫彉閲�
                     Unfinished_opening_plan_number = 3 - addition_position_number
+                    logger.info(f"浠婃棩鐨勫墿浣欐柊澧炴寔浠撴暟閲�==={Unfinished_opening_plan_number}")
                     if Unfinished_opening_plan_number != 0:
                         # 濡傛灉GUI鐪嬬洏涓婃病鏈夋墜鍔ㄨ缃叿浣撶殑涓嬪崟閲戦锛屽氨鎸夌収璇勫垎绛栫暐鐨勯噾棰濅笅鍗曪紝鍚﹀垯灏辨寜鐓UI璁剧疆鐨勯噾棰濅笅鍗曘��
                         if data_cache.BUY_MONEY_PER_CODE < 0:
                             # 鏍规嵁璐︽埛鍙敤閲戦 璁$畻浠婃棩璁″垝涓嬪崟閲戦
                             # 璐︽埛鍙敤閲戦 榛樿涔樹互0.9锛屾案杩滅暀涓�鐐归挶锛屼竴鏂归潰涔熷啑浣欎竴浜涜绠楄宸�
                             #  ((澶х洏缁煎悎寮哄害鍒嗘暟 + 澶х洏鎸囨暟鎯呯华棰勬湡鍒嗘暟) * 0.01) * (璐︽埛鍙敤閲戦 * 0.9 * 鏋佺浣庤糠鎯呯华姣斾緥 / 浠婃棩鏈�澶ф柊澧炴寔浠撶エ鏁�)
-                            # data_cache.today_planned_order_amount = ((data_cache.real_time_market_strong + index_trend_expectation_score) * 0.01) * (
+                            # data_cache.today_planned_order_amount = ((data_cache.real_time_market_strong + data_cache.index_trend_expectation_score) * 0.01) * (
                             #                                                 usefulMoney * 0.9 * low_emotion_mood_ratio / Unfinished_opening_plan_number)
-                            data_cache.today_planned_order_amount = (index_trend_expectation_score * 0.01) * (usefulMoney * 0.95 * low_emotion_mood_ratio / Unfinished_opening_plan_number)
+                            data_cache.today_planned_order_amount = (data_cache.index_trend_expectation_score * 0.01) * (usefulMoney * 0.95 * low_emotion_mood_ratio / Unfinished_opening_plan_number)
+                            logger.info(f"閲囩敤寮�浠撶瓥鐣ヨ绠楁柟寮�=銆嬩粖鏃ヨ鍒掍笅鍗曢噾棰�:{data_cache.today_planned_order_amount}锛�")
                         else:
                             data_cache.today_planned_order_amount = data_cache.BUY_MONEY_PER_CODE
+                            logger.info(f"閲囩敤GUI璁剧疆鏂瑰紡=銆嬩粖鏃ヨ鍒掍笅鍗曢噾棰�:{data_cache.today_planned_order_amount}")
 
         except Exception as error:
             logger.error(f"鑾峰彇瀹炴椂澶х洏琛屾儏鎯呯华缁煎悎寮哄害[鍒嗘暟] 鍑芥暟鎶ラ敊: {error}")

--
Gitblit v1.8.0