From 4062c0d9d4b7bc8e1d9e866a86c98db5c51f4fa0 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期三, 15 十一月 2023 16:12:47 +0800
Subject: [PATCH] K线形态加入计算

---
 code_attribute/first_target_code_data_processor.py |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/code_attribute/first_target_code_data_processor.py b/code_attribute/first_target_code_data_processor.py
index d2f6e6b..4ba2818 100644
--- a/code_attribute/first_target_code_data_processor.py
+++ b/code_attribute/first_target_code_data_processor.py
@@ -119,6 +119,11 @@
                                                            volumes_data[:90]))
                 logger_first_code_record.info("{} 鑾峰彇鍒伴鏉�60澶╂渶澶ч噺锛歿}", code, volumes)
                 code_volumn_manager.set_histry_volumn(code, volumes[0], volumes[1], volumes[2])
+
+                # 淇濆瓨K绾垮舰鎬�
+                k_format = code_nature_analyse.get_k_format(limit_up_price, volumes_data)
+                code_nature_analyse.CodeNatureRecordManager().save_k_format(code, k_format)
+
                 if code_nature_analyse.is_up_too_high_in_10d(volumes_data):
                     # 鍒ゆ柇鏄惁澶珮
                     l2_trade_util.forbidden_trade(code, "鑲′环闀垮緱澶珮")
@@ -223,3 +228,12 @@
     gpcode_first_screen_manager.process_ticks(prices)
     logger_l2_codes_subscript.info(f"({request_id})l2浠g爜鐩稿叧鏁版嵁鍔犺浇瀹屾垚")
     return tick_datas
+
+
+if __name__ == "__main__":
+    code = "002308"
+    limit_up_price = gpcode_manager.get_limit_up_price(code)
+    volumes_data = inited_data.get_volumns_by_code(code, 150)
+    # 淇濆瓨K绾垮舰鎬�
+    k_format = code_nature_analyse.get_k_format(limit_up_price, volumes_data)
+    code_nature_analyse.CodeNatureRecordManager().save_k_format(code, k_format)
\ No newline at end of file

--
Gitblit v1.8.0