| | |
| | | selling_strategy |
| | | from huaxin_client import l2_market_client, l2_client, trade_client |
| | | from log_module import async_log_util, log |
| | | from strategy.order_methods import TodayBuyCodeManager |
| | | from trade import huaxin_trade_data_update, huaxin_trade_api |
| | | from utils import hx_qc_value_util, huaxin_util, juejin_api, tool |
| | | |
| | |
| | | local_data_management.read_local_K_line_data() |
| | | # 读取本地个股所属板块数据 并更新到data_cache |
| | | local_data_management.read_local_all_stocks_plate_data() |
| | | # 初始化拉取当日买入代码 |
| | | TodayBuyCodeManager() |
| | | |
| | | # todo 2025-03-25 测试无误即可删除下部注释 |
| | | # # 先使用json.load()直接从文件中读取【已经存储在本地的K线指标属性字典】并解析JSON数据 |
| | | # if os.path.exists(constant.K_BARS_PATH): |
| | | # with open(constant.K_BARS_PATH, 'r', encoding='utf-8') as f: |
| | | # data_cache.all_stocks_all_K_line_property_dict = json.load(f) |
| | | # print( |
| | | # f"data_cache.all_stocks_all_K_line_property_dict的个数==={len(data_cache.all_stocks_all_K_line_property_dict)}") |
| | | |
| | | # # 获取目标标的K线---初始化 |
| | | # all_K_line.main_index_k_line_history.init(data_cache.DataCache().today_date, data_cache.DataCache().next_trading_day, data_cache.DataCache().main_index_stocks) |
| | | # # 直接调用主要指数K线写入本地文件 |
| | | # all_K_line.main_index_k_line_dict_write() |
| | | |
| | | |
| | | # 第一步:初始化context函数,并开启获取实时数据的线程 |
| | |
| | | limit_up_price = tool.get_limit_up_price(code, self.__pre_close_price_dict[code]) |
| | | if code in self.__last_price_dict: |
| | | if abs(limit_up_price - self.__last_price_dict[code]) < 0.0001 < abs(limit_up_price - price): |
| | | # TODO 处理炸板逻辑 |
| | | # 处理炸板逻辑 |
| | | # 监听了炸板了要做的函数 |
| | | try: |
| | | selling_strategy.explosion_strategy(code) |
| | |
| | | |
| | | |
| | | # 加载开盘啦板块日志数据 |
| | | kpl_data_manager.KPLStockOfMarketsPlateLogManager() |
| | | kpl_data_manager.KPLMarketsSiftPlateLogManager() |
| | | kpl_data_manager.KPLMarketStockHeatLogManager() |
| | | |
| | | # 启动异步日志 |
| | | threading.Thread(target=async_log_util.run_sync, daemon=True).start() |