strategy/all_K_line.py | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
strategy/buying_strategy.py | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
strategy/check_timer.py | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
strategy/data_cache.py | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
strategy/index_market_trend_strategy.py | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
strategy/instant_time_market.py | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
strategy/kpl_api.py | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
strategy/selling_strategy.py | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
strategy/all_K_line.py
@@ -448,7 +448,7 @@ while True: try: # 声明赋值实时时间 now_time = data_cache.now_time now_time = tool.get_now_time_str() # print(f"now_time==={now_time}") # if now_time > data_cache.AFTER_CLOSING_TIME and data_cache.execution is False: strategy/buying_strategy.py
@@ -102,8 +102,6 @@ # 涨幅视界策略【根据涨幅进入视界为起始的策略】 def growth_view_strategy(current_info): # 设定当前时间点 # now_time = datetime.datetime.now().strftime("%H:%M:%S") symbol_code = current_info[0] # 券商接口为纯数字编号 symbol = basic_methods.format_stock_symbol(symbol_code) # 掘金数据来源的股票代码 # symbol_code = symbol.split('.')[1] # 将掘金格式的股票代码转化为纯数字类型 @@ -239,7 +237,7 @@ # 创建一个已买板块集合 bought_plate_set = set(data_cache.bought_plate) # 设定当前时间点 now_time = data_cache.now_time now_time = tool.get_now_time_str() ''' 新多分支条件逻辑视界【概念?强度?强拉?消息?价值?】 ''' @@ -564,8 +562,7 @@ logger.info(f"【不利】昨日跌停!不买!!") # elif k_line_data[0]['attribute'] == 'up_down' and k_line_data[0]['today_volume_shape'] == 'increases_down': # logger.info(f"【不利】昨日高开低走 且 放量下跌,不买!!公司名称:{k_line_data[0]['sec_name']}") elif k_line_data[0]['attribute'] == 'down_down' and k_line_data[0][ 'today_volume_shape'] == 'increases_down': elif k_line_data[0]['attribute'] == 'down_down' and k_line_data[0]['today_volume_shape'] == 'increases_down': logger.info( f"【不利】昨日低开低走 且 放量下跌,不买!!公司名称:{k_line_data[0]['sec_name']}") elif throwing_pressure_position[0] is True: @@ -662,9 +659,7 @@ logger.info(f"昨日首板炸板,当日中等以上高开 {today_open_growth}% !") # 在买票预设时间段 视界 if limit_up_day > 6 and any( 'attribute' in d and d['attribute'] in data_cache.limit_up_type for d in k_line_data[1:3]) and current_volume <= k_line_data[0][ 'volume'] * 1.5: 'attribute' in d and d['attribute'] in data_cache.limit_up_type for d in k_line_data[1:3]) and current_volume <= k_line_data[0]['volume'] * 1.5: logger.info( f"【不利】过于显著票 且 上日或上上涨停板 当日量还不足昨日量的1.5倍!不买!! 今日当时成交量为昨日等比量的{round(current_volume / k_line_data[0]['volume'], 2)}倍,90天内涨停天数:{limit_up_day}") elif len(data_cache.addition_position_symbols_set) >= 3: strategy/check_timer.py
@@ -7,6 +7,8 @@ from log_module.log import logger_common from strategy import data_cache from strategy import kpl_api from utils import tool # from strategy import instant_time_market # 获取logger实例 @@ -23,7 +25,7 @@ while True: try: # 声明赋值实时时间 now_time = data_cache.now_time now_time = tool.get_now_time_str() # print(f"now_time==={now_time}") if now_time > data_cache.AFTER_CLOSING_TIME and data_cache.execution is False: # 整理当日涨停信息并写入本地管理好本地数据 strategy/data_cache.py
@@ -108,7 +108,7 @@ ''' 设定常用当前时间函数方法 设定常用当前时间函数方法,为什么这里不是一个函数方法???? ''' now_time = datetime.datetime.now().strftime("%H:%M:%S") # 定义并实时获取 当前时间 ''' strategy/index_market_trend_strategy.py
@@ -13,6 +13,7 @@ # import account_management from strategy import order_methods from utils import tool # 获取logger实例 logger = logger_common @@ -70,7 +71,7 @@ logger.info(f"创业板指 当日涨幅 ==== {round(data_cache.TSXV_today_growth, 4)}%") # 在集合竞价时更新一下 各个指数的开盘涨幅 now_time = data_cache.now_time now_time = tool.get_now_time_str() # 9:25:06 < now_time < 9:25:12 记录开盘指数 及 开盘涨幅 if data_cache.LATER_OPEN_BIDDING_TIME < now_time < data_cache.AFTER_OPEN_BIDDING_TIME: index_K_line['Shanghai']['Shanghai_open_index'] = Shanghai_index strategy/instant_time_market.py
@@ -7,7 +7,7 @@ import datetime import utils from log_module.log import logger_common from utils import huaxin_util from utils import huaxin_util, tool # 引入华鑫API(小辉整理) from strategy import l1_data_api from strategy import data_cache @@ -31,7 +31,7 @@ try: # 在data_cache中获取到推送过来的实时指数行情数据 stock_index_dict = data_cache.stock_index_dict now_time = data_cache.now_time now_time = tool.get_now_time_str() if len(stock_index_dict) == 0 and data_cache.L1_DATA_START_TIME < now_time < data_cache.CLOSING_TIME: print(f"9:15--15:00 实时指数数据为空===={stock_index_dict}") index_judge_thread_manager(stock_index_dict) @@ -69,7 +69,7 @@ def get_all_stocks_current_open(current_infos): pass # 获取当前时间 now_time = data_cache.now_time now_time = tool.get_now_time_str() # 如果当前时间大于09:25:06才运行最高价和最低价的运算 if data_cache.LATER_OPEN_BIDDING_TIME < now_time: # if data_cache.AFTER_CLOSING_TIME < now_time: @@ -158,7 +158,7 @@ # 生成所有个股的最高价、最低价 字典 def get_all_stocks_current_high_and_low(current_infos): # 获取当前时间 now_time = data_cache.now_time now_time = tool.get_now_time_str() # 如果当前时间大于09:25:06才运行最高价和最低价的运算 if data_cache.LATER_OPEN_BIDDING_TIME < now_time: # if data_cache.AFTER_CLOSING_TIME < now_time: @@ -270,7 +270,7 @@ try: now_start = time.time() current_infos = l1_data_api.get_current_info() now_time = data_cache.now_time now_time = tool.get_now_time_str() if len(current_infos) == 0 and now_time > data_cache.L1_DATA_START_TIME: print(f"9:15后 l1数据为空=l1_data_current_infos===={current_infos}") # for i in current_infos: @@ -301,7 +301,7 @@ logging.info(f"set_current_info进入") try: now_start = time.time() now_time = data_cache.now_time now_time = tool.get_now_time_str() if len(current_infos) == 0 and now_time > data_cache.L1_DATA_START_TIME: print(f"9:15后 l1数据为空=l1_data_current_infos===={current_infos}") # for i in current_infos: strategy/kpl_api.py
@@ -17,7 +17,7 @@ from strategy.index_market_trend_strategy import index_trend_expectation from trade import middle_api_protocol from utils import hx_qc_value_util from utils import hx_qc_value_util, tool # 获取logger实例 logger = logger_common @@ -278,7 +278,7 @@ ds.append(request_plate_codes(d)) dask_result = batch_get_plate_codes(ds) dask_result.compute() now_time = data_cache.now_time now_time = tool.get_now_time_str() if data_cache.L1_DATA_START_TIME < now_time < data_cache.CLOSING_TIME: logger.info(f"精选板块股票强度数据更新 == {market_sift_plate_stock_dict}") return market_sift_plate_stock_dict @@ -331,7 +331,7 @@ # 获取涨停板块名称列表并存储本地的函数 def get_limit_up_block_names(): # 设定当前时间点 now_time = data_cache.now_time now_time = tool.get_now_time_str() # print(f"now_time===={now_time}") if data_cache.SERVER_RESTART_TIME < now_time < data_cache.UPDATE_DATA_TIME: # print(f"在时间内使用--------------------------") @@ -718,7 +718,7 @@ while True: try: if data_cache.position_automatic_management_switch is True: now_time = data_cache.now_time now_time = tool.get_now_time_str() if data_cache.SERVER_RESTART_TIME < now_time < data_cache.UPDATE_DATA_TIME: # 获取大盘综合强度分数 data_cache.real_time_market_strong = get_market_strong() strategy/selling_strategy.py
@@ -13,6 +13,7 @@ # import account_management from strategy import order_methods from utils import tool # 获取logger实例 logger = logger_common @@ -96,7 +97,7 @@ # 分时变化策略 def instantaneous_change_strategy(current_info): # 设定当前时间点 now_time = data_cache.now_time now_time = tool.get_now_time_str() symbol_code = current_info[0] # 券商接口为纯数字编号 # symbol = symbol_code symbol = basic_methods.format_stock_symbol(symbol_code) # 转化为掘金数据来源的股票代码