From b116fc107f4f61fb80e5b636dee44d8bcfec2783 Mon Sep 17 00:00:00 2001 From: admin <admin@example.com> Date: 星期一, 19 五月 2025 13:54:01 +0800 Subject: [PATCH] 1.修改 所有策略分支100亿市值都加上大单门槛 2.解决 首次下单金额赋值问题 3.宽泛概念加上“创投” --- strategy/market_sentiment_analysis.py | 35 ++++++++++++++++------------------- 1 files changed, 16 insertions(+), 19 deletions(-) diff --git a/strategy/market_sentiment_analysis.py b/strategy/market_sentiment_analysis.py index 53828f9..b113391 100644 --- a/strategy/market_sentiment_analysis.py +++ b/strategy/market_sentiment_analysis.py @@ -773,26 +773,23 @@ data_cache.today_planned_order_amount = usefulMoney * 0.95 * ideal_trading_market_score / 3 logger.info(f"绗竴娆″疄鏃惰绠楄鍒掍笅鍗曢噾棰�==={data_cache.today_planned_order_amount}鍏�") - # 鑰佺殑璁$畻鏂规鍏堝悗椤哄簭鏂规硶 # 寮�浠撹鍒掕繍琛屾椂闂存 - # if data_cache.OPENING_TIME < now_time < data_cache.NOON_MARKET_TIME: - # # # 濡傛灉涓�鏃ヤ笁浠撶殑璁″垝杩樻湭瀹屾垚 涓� 棣栨寮�浠撻噾棰濅负0 - # if Unfinished_opening_plan_number != 0 and data_cache.today_first_planned_order_amount <= 0: - # # 濡傛灉GUI鐪嬬洏鎵嬪姩璁剧疆浜嗗叿浣撶殑涓嬪崟閲戦銆恉ata_cache.BUY_MONEY_PER_CODE 涓粯璁ゅ�间负-1锛屽彧鏈夊綋GUI鐪嬬洏鎵嬪姩璁剧疆浜嗗苟鎻愪氦鎵嶄細>=0銆戯紝灏辨寜鐓UI璁剧疆鐨勯噾棰濅笅鍗曘�傚惁鍒欏氨鎸夌収璇勫垎绛栫暐鐨勯噾棰濅笅鍗曪紝 - # # if data_cache.BUY_MONEY_PER_CODE >= 0: - # # data_cache.today_planned_order_amount = data_cache.BUY_MONEY_PER_CODE - # # logger.info(f"閲囩敤GUI璁剧疆鏂瑰紡=銆嬩粖鏃ヨ鍒掍笅鍗曢噾棰�:{data_cache.today_planned_order_amount}") - # # else: - # # # 濡傛灉浠婃棩杩樻病鏈変竴涓柊澧炰粨浣嶏紝灏变笉鍋滆绠楁洿鏂拌鍒掗噾棰� - # # if addition_position_number > 0: - # # data_cache.today_planned_order_amount = data_cache.opening_strategy_results - # # logger.info(f"閲囩敤寮�浠撶瓥鐣ヨ绠楁柟寮�=銆嬩粖鏃ヨ鍒掍笅鍗曢噾棰�:{data_cache.today_planned_order_amount}") - # if addition_position_number > 0: - # # 涓嬭繃涓�娆″崟杩囧悗鍐嶈绠楀姩鎬佷笅鍗曢噾棰� - # data_cache.today_first_planned_order_amount = float( - # data_cache.today_planned_order_amount) - # logger.info( - # f"閲囩敤寮�浠撶瓥鐣ヨ绠楁柟寮�--銆嬩粖鏃�(棣栦釜)鏂板鎸佷粨浜х敓锛屽皢瀹炴椂璁$畻閲戦璧嬪�肩粰棣栫瑪鎸佷粨閲戦=銆嬩粖鏃ヨ鍒掍笅鍗曢噾棰�:{data_cache.today_planned_order_amount}") + # # 濡傛灉涓�鏃ヤ笁浠撶殑璁″垝杩樻湭瀹屾垚 涓� 棣栨寮�浠撻噾棰濅负0 + if Unfinished_opening_plan_number != 0 and data_cache.today_first_planned_order_amount <= 0: + # 濡傛灉GUI鐪嬬洏鎵嬪姩璁剧疆浜嗗叿浣撶殑涓嬪崟閲戦銆恉ata_cache.BUY_MONEY_PER_CODE 涓粯璁ゅ�间负-1锛屽彧鏈夊綋GUI鐪嬬洏鎵嬪姩璁剧疆浜嗗苟鎻愪氦鎵嶄細>=0銆戯紝灏辨寜鐓UI璁剧疆鐨勯噾棰濅笅鍗曘�傚惁鍒欏氨鎸夌収璇勫垎绛栫暐鐨勯噾棰濅笅鍗曪紝 + # if data_cache.BUY_MONEY_PER_CODE >= 0: + # data_cache.today_planned_order_amount = data_cache.BUY_MONEY_PER_CODE + # logger.info(f"閲囩敤GUI璁剧疆鏂瑰紡=銆嬩粖鏃ヨ鍒掍笅鍗曢噾棰�:{data_cache.today_planned_order_amount}") + # else: + # # 濡傛灉浠婃棩杩樻病鏈変竴涓柊澧炰粨浣嶏紝灏变笉鍋滆绠楁洿鏂拌鍒掗噾棰� + # if addition_position_number > 0: + # data_cache.today_planned_order_amount = data_cache.opening_strategy_results + # logger.info(f"閲囩敤寮�浠撶瓥鐣ヨ绠楁柟寮�=銆嬩粖鏃ヨ鍒掍笅鍗曢噾棰�:{data_cache.today_planned_order_amount}") + if addition_position_number > 0: + # 涓嬭繃涓�娆″崟杩囧悗鍐嶈绠楀姩鎬佷笅鍗曢噾棰� + data_cache.today_first_planned_order_amount = float(data_cache.today_planned_order_amount) + logger.info( + f"閲囩敤寮�浠撶瓥鐣ヨ绠楁柟寮�--銆嬩粖鏃�(棣栦釜)鏂板鎸佷粨浜х敓锛屽皢瀹炴椂璁$畻閲戦璧嬪�肩粰棣栫瑪鎸佷粨閲戦=銆嬩粖鏃ヨ鍒掍笅鍗曢噾棰�:{data_cache.today_planned_order_amount}") except Exception as error: logger_debug.exception(error) -- Gitblit v1.8.0