| | |
| | | # import decimal |
| | | import datetime |
| | | |
| | | from log_module import async_log_util |
| | | from log_module.log import logger_common |
| | | # import time |
| | | # 引入掘金API |
| | |
| | | symbol_volume_trackers = {} |
| | | |
| | | |
| | | def logger_info(content): |
| | | """ |
| | | 日志记录 |
| | | :param content: |
| | | :return: |
| | | """ |
| | | async_log_util.info(logger, content) |
| | | |
| | | |
| | | # 更新个股成交量函数 |
| | | def update_symbol_volume(symbol, new_volume): |
| | | # 确保股票代码在字典中有对应的VolumeTracker实例 |
| | |
| | | # print(f"element=={element}") |
| | | element_symbol = basic_methods.format_stock_symbol(element['securityID']) |
| | | if symbol_code == element['securityID']: # 当循环到的持仓代码正好是current_data的代码时,即取得了持仓个股的行情快照数据 |
| | | # logger.info(f"index = {index}") |
| | | # logger.info(f"element = {element}") |
| | | # logger_info(f"index = {index}") |
| | | # logger_info(f"element = {element}") |
| | | account_positions_symbol = element_symbol # 当前循环到的持仓个股代码 |
| | | # print(f"account_positions_symbol==={account_positions_symbol}") |
| | | # available_now = element['available_now'] # 当前个股可用金额 |
| | |
| | | if position_volume_yesterday > 0: # 如果可用资金不等于0 且 持仓数量大于0 (不知名原因导致有些票会获取到零值导致后续公式报错,阻止intraday_growth函数正常运行) |
| | | # 进入集合竞价前和收盘前作持仓可用交易,在此时间为不生效 |
| | | if data_cache.BEFORE_OPEN_BIDDING_TIME < now_time < data_cache.AFTER_CLOSING_TIME: |
| | | # logger.info(f"account_positions_element = 【{k_line_data[0]['sec_name']}】 代码:{element['symbol']} 股持仓均价:{element['vwap']} 持仓量:{element['volume']} ") |
| | | # logger_info(f"account_positions_element = 【{k_line_data[0]['sec_name']}】 代码:{element['symbol']} 股持仓均价:{element['vwap']} 持仓量:{element['volume']} ") |
| | | # print(f"available_now_index===={index}") |
| | | # 调用涨幅公式计算对应的股票tick瞬时涨幅 |
| | | tick_growth = basic_methods.tick_growth(symbol, current_price) |
| | |
| | | 集合竞价阶段决断(只判断一次) |
| | | ''' |
| | | # 09:25:06---09:30:00 |
| | | if data_cache.LATER_OPEN_BIDDING_TIME < now_time < data_cache.OPENING_TIME and data_cache.execution_times < len(data_cache.available_symbols_set): |
| | | if data_cache.LATER_OPEN_BIDDING_TIME < now_time < data_cache.OPENING_TIME and data_cache.execution_times < len( |
| | | data_cache.available_symbols_set): |
| | | # 每进入该条件分支一次就把进入次数自加1 |
| | | data_cache.execution_times += 1 |
| | | logger.info(f"这个分支逻辑已经执行次数:{data_cache.execution_times}") |
| | | logger.info( |
| | | logger_info(f"这个分支逻辑已经执行次数:{data_cache.execution_times}") |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】,开盘涨幅:{today_open_growth}%,当日当时涨幅:{today_growth},瞬时涨幅{tick_growth},当日当时浮动盈亏{floating_profit_and_loss}。当日开盘价:{current_open},昨日收盘价:{k_line_data[0]['close']}") |
| | | # 昨日起飞失败 |
| | | if k_line_data[0]['attribute'] not in ( |
| | | data_cache.limit_up_type + data_cache.frying_plate_type + data_cache.limit_down_type): |
| | | if floating_profit_and_loss > 0: |
| | | if today_open_growth < -1: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日起飞失败】【浮盈】【低开】,低开:{today_open_growth}%,设定委卖数量【十分之一仓】") |
| | | order_methods.sell_order_by_part_volume(0.1, symbol, position_volume_yesterday, |
| | | current_price, |
| | |
| | | if floating_profit_and_loss <= 0: |
| | | # 中高开/大高开视界 |
| | | if today_open_growth >= 4: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日起飞失败】【浮亏】【中高开/大高开】,高开:{today_open_growth}%,设定委卖数量【十分之五仓】") |
| | | order_methods.sell_order_by_part_volume(0.5, symbol, position_volume_yesterday, |
| | | current_price, |
| | | k_line_data[0]['sec_name'], index) |
| | | # 小高开视界 |
| | | if 4 > today_open_growth >= 1: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日起飞失败】【浮亏】【小高开】,高开:{today_open_growth}%,设定委卖数量【十分之三仓】") |
| | | order_methods.sell_order_by_part_volume(0.3, symbol, position_volume_yesterday, |
| | | current_price, |
| | |
| | | index) |
| | | # 平开视界 +- 1 |
| | | if -1 < today_open_growth < 1: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【平开】【{k_line_data[0]['sec_name']}】【昨日起飞失败】【浮亏】【平开】,平开:{today_open_growth}%,设定委卖数量【十分之五仓】") |
| | | order_methods.sell_order_by_part_volume(0.5, symbol, position_volume_yesterday, |
| | | current_price, |
| | |
| | | index) |
| | | # 低开视界 |
| | | if today_open_growth <= -1: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日起飞失败】【浮亏】【小低开】,低开:{today_open_growth}%,设定委卖数量【全仓】") |
| | | order_methods.sell_order_by_part_volume(1, symbol, position_volume_yesterday, |
| | | current_price, |
| | |
| | | if floating_profit_and_loss <= 0: |
| | | # 平开视界 < ±1% |
| | | if -1 < today_open_growth < 1: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日涨停】【浮亏】【平开】,平开:{today_open_growth}%,设定委卖数量【无,集合竞价阶段不决策】") |
| | | # 低开视界 |
| | | if today_open_growth <= -1: |
| | | # 小低开视界 |
| | | if -4 < today_open_growth <= -1: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日涨停】【浮亏】【小低开】,低开:{today_open_growth}%,设定委卖数量【十分之五仓】") |
| | | order_methods.sell_order_by_part_volume(0.5, symbol, position_volume_yesterday, |
| | | order_methods.sell_order_by_part_volume(0.5, symbol, |
| | | position_volume_yesterday, |
| | | current_price, |
| | | k_line_data[0]['sec_name'], index) |
| | | # 中低开/大低开视界 |
| | | if today_open_growth <= -4: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日涨停】【浮亏】【中低开/大低开】,低开:{today_open_growth}%,设定委卖数量【全仓】") |
| | | order_methods.sell_order_by_part_volume(1, symbol, position_volume_yesterday, |
| | | order_methods.sell_order_by_part_volume(1, symbol, |
| | | position_volume_yesterday, |
| | | current_price, |
| | | k_line_data[0]['sec_name'], index) |
| | | # 如果昨日集合竞价最后时刻炸板的股票【开盘啦昨日炸板但通过K线数据计算涨停的股票代码列表】 |
| | | if symbol in data_cache.yesterday_frying_plate_last_minute_list: |
| | | # 开盘涨幅小于9.6% |
| | | if today_open_growth < 9.6: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日K线涨停,开盘啦炸板】【非触摸板状态】,开盘涨幅:{today_open_growth}%,设定委卖数量【全仓】") |
| | | order_methods.sell_order_by_part_volume(1, symbol, position_volume_yesterday, |
| | | current_price, |
| | |
| | | if floating_profit_and_loss > 0: |
| | | # 中高开/大高开视界 |
| | | if today_open_growth >= 4: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日炸板】【浮盈】【中高开/大高开】,高开:{today_open_growth}%,设定委卖数量【二十分之一仓】") |
| | | order_methods.sell_order_by_part_volume(0.05, symbol, position_volume_yesterday, |
| | | current_price, |
| | | k_line_data[0]['sec_name'], index) |
| | | # 小高开视界 |
| | | if 4 > today_open_growth >= 1: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日炸板】【浮盈】【小高开】,高开:{today_open_growth}%,设定委卖数量【十分之一仓】") |
| | | order_methods.sell_order_by_part_volume(0.1, symbol, position_volume_yesterday, |
| | | current_price, |
| | | k_line_data[0]['sec_name'], index) |
| | | # 平开视界 < ±1% |
| | | if -1 < today_open_growth < 1: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日炸板】【浮盈】【平开】,平开:{today_open_growth}%,设定委卖数量【十分之五仓】") |
| | | order_methods.sell_order_by_part_volume(0.5, symbol, position_volume_yesterday, |
| | | current_price, |
| | | k_line_data[0]['sec_name'], index) |
| | | # 小低开视界 |
| | | if -4 < today_open_growth <= -1: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日炸板】【浮盈】【小低开】,低开:{today_open_growth}%,设定委卖数量【十分之七仓】") |
| | | order_methods.sell_order_by_part_volume(0.7, symbol, position_volume_yesterday, |
| | | current_price, |
| | | k_line_data[0]['sec_name'], index) |
| | | # 中低开/大低开视界 |
| | | if today_open_growth <= -4: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日炸板】【中低开/大低开】,低开:{today_open_growth}%,设定委卖数量【全仓】") |
| | | order_methods.sell_order_by_part_volume(1, symbol, position_volume_yesterday, |
| | | current_price, |
| | |
| | | if floating_profit_and_loss <= 0: |
| | | # 中高开/大高开视界 |
| | | if today_open_growth >= 4: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日炸板】【浮亏】【中高开/大高开】,高开:{today_open_growth}%,设定委卖数量【十分之二仓】") |
| | | order_methods.sell_order_by_part_volume(0.2, symbol, position_volume_yesterday, |
| | | current_price, |
| | | k_line_data[0]['sec_name'], index) |
| | | # 小高开视界 |
| | | if 4 > today_open_growth >= 1: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日炸板】【浮亏】【小高开】,高开:{today_open_growth}%,设定委卖数量【十分之五仓】") |
| | | order_methods.sell_order_by_part_volume(0.5, symbol, position_volume_yesterday, |
| | | current_price, |
| | | k_line_data[0]['sec_name'], index) |
| | | # 平开视界 < ±1% |
| | | if -1 < today_open_growth < 1: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日炸板】【浮亏】【平开】,平开:{today_open_growth}%,设定委卖数量【十分之五仓】") |
| | | order_methods.sell_order_by_part_volume(0.5, symbol, position_volume_yesterday, |
| | | current_price, |
| | | k_line_data[0]['sec_name'], index) |
| | | # 小低开视界 |
| | | if -4 < today_open_growth <= -1: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日炸板】【浮亏】【小低开】,低开:{today_open_growth}%,设定委卖数量【十分之七仓】") |
| | | order_methods.sell_order_by_part_volume(0.7, symbol, position_volume_yesterday, |
| | | current_price, |
| | | k_line_data[0]['sec_name'], index) |
| | | # 中低开/大低开视界 |
| | | if today_open_growth <= -4: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日炸板】【浮亏】【中低开/大低开】,低开:{today_open_growth}%,设定委卖数量【全仓】") |
| | | order_methods.sell_order_by_part_volume(1, symbol, position_volume_yesterday, |
| | | current_price, |
| | | k_line_data[0]['sec_name'], index) |
| | | # 昨日跌停视界 |
| | | if k_line_data[0]['attribute'] in data_cache.limit_down_type: |
| | | logger.info( |
| | | logger_info( |
| | | f"【集合竞价】【{k_line_data[0]['sec_name']}】【昨日跌停】【无论开盘涨幅多少!!!】,开盘涨幅:{today_open_growth}%,设定委卖数量【全仓】") |
| | | order_methods.sell_order_by_part_volume(1, symbol, position_volume_yesterday, |
| | | current_price, |
| | |
| | | # 浮动盈亏【亏】 |
| | | if floating_profit_and_loss < 0: |
| | | if tick_growth < -0.1 and current_price <= current_low: |
| | | logger.info( |
| | | logger_info( |
| | | f"【开盘临机】【浮动盈亏当前亏】【瞬时跌幅 <-0.1%】【当日新低】【{k_line_data[0]['sec_name']}】,设定委卖数量【十分之一仓】,【瞬时跌幅:{round(tick_growth, 2)}%】,当日当时涨幅:{today_growth}。最新价::{current_price},昨日收盘价:{k_line_data[0]['close']}") |
| | | order_methods.sell_order_by_part_volume(0.1, symbol, position_volume_yesterday, |
| | | order_methods.sell_order_by_part_volume(0.1, symbol, |
| | | position_volume_yesterday, |
| | | current_price, |
| | | k_line_data[0]['sec_name'], index) |
| | | if tick_growth < -1 and today_growth < 0 and current_price <= current_low: |
| | | logger.info( |
| | | logger_info( |
| | | f"【开盘临机】【浮动盈亏当前亏】【瞬时跌幅 <-1%】【当日当时涨幅 <0%】【当日新低】【{k_line_data[0]['sec_name']}】,设定委卖数量【全仓】,【瞬时跌幅:{round(tick_growth, 2)}%】,当日当时涨幅:{today_growth}。最新价::{current_price},昨日收盘价:{k_line_data[0]['close']}") |
| | | order_methods.sell_order_by_part_volume(1, symbol, position_volume_yesterday, |
| | | order_methods.sell_order_by_part_volume(1, symbol, |
| | | position_volume_yesterday, |
| | | current_price, |
| | | k_line_data[0]['sec_name'], index) |
| | | # 昨日涨停视界 |
| | |
| | | # 浮动盈亏【亏】 |
| | | if floating_profit_and_loss < 0: |
| | | if tick_growth < -0.1 and today_growth < -4: |
| | | logger.info( |
| | | logger_info( |
| | | f"【开盘临机】【浮动盈亏当前亏】【瞬时跌幅 <-1%】【当日当时涨幅 <-4%】【{k_line_data[0]['sec_name']}】,设定委卖数量【十分之一仓】,【瞬时跌幅:{round(tick_growth, 2)}%】,当日当时涨幅:{today_growth}。最新价::{current_price},昨日收盘价:{k_line_data[0]['close']}") |
| | | order_methods.sell_order_by_part_volume(0.1, symbol, |
| | | position_volume_yesterday, |
| | |
| | | k_line_data[0]['sec_name'], |
| | | index) |
| | | if tick_growth < -0.1 and today_growth < 0 and current_price <= current_low: |
| | | logger.info( |
| | | logger_info( |
| | | f"【开盘临机】【浮动盈亏当前亏】【瞬时跌幅 <-1%】【当日当时涨幅小于0%】【当日新低】【{k_line_data[0]['sec_name']}】,设定委卖数量【全仓】,【瞬时跌幅:{round(tick_growth, 2)}%】,当日当时涨幅:{today_growth}。最新价::{current_price},昨日收盘价:{k_line_data[0]['close']}") |
| | | order_methods.sell_order_by_part_volume(1, symbol, |
| | | position_volume_yesterday, |
| | |
| | | # 浮动盈亏【亏】 |
| | | if floating_profit_and_loss < 0: |
| | | if tick_growth < -0.1 and current_price <= current_low: |
| | | logger.info( |
| | | logger_info( |
| | | f"【开盘临机】【浮动盈亏当前亏】【瞬时跌幅 <-0.1%】【当日新低】【{k_line_data[0]['sec_name']}】,设定委卖数量【十分之一仓】,【瞬时跌幅:{round(tick_growth, 2)}%】,当日当时涨幅:{today_growth}。最新价::{current_price},昨日收盘价:{k_line_data[0]['close']}") |
| | | order_methods.sell_order_by_part_volume(0.1, symbol, |
| | | position_volume_yesterday, |
| | |
| | | k_line_data[0]['sec_name'], |
| | | index) |
| | | if tick_growth < -1 and today_growth < 0 and current_price <= current_low: |
| | | logger.info( |
| | | logger_info( |
| | | f"【开盘临机】【浮动盈亏当前亏】【瞬时跌幅 <-1%】【当日当时涨幅小于0%】【当日新低】【{k_line_data[0]['sec_name']}】,设定委卖数量【全仓】,【瞬时跌幅:{round(tick_growth, 2)}%】,当日当时涨幅:{today_growth}。最新价::{current_price},昨日收盘价:{k_line_data[0]['close']}") |
| | | order_methods.sell_order_by_part_volume(1, symbol, |
| | | position_volume_yesterday, |
| | |
| | | if data_cache.OPENING_TIME < now_time < data_cache.WATCH_DISK_END_TIME: |
| | | # if symbol in data_cache.LIMIT_UP_SELL_CODES: |
| | | if today_limit_up_price == current_high: |
| | | logger.info( |
| | | logger_info( |
| | | f"【开盘临机】【{k_line_data[0]['sec_name']}】 触及涨停! 买一总金额:{round(current_quotes_buy[0][1] * current_quotes_buy[0][0] / 10000, 2)} 万,当日当时量:{current_volume}") |
| | | # 如果 买一总金额 < 200000 买一总金额 在L1情况下估计的炸板前最后一刻的最低买一额无法缩小到更小,其本身跨度也因股票因时间因往下砸的力度而异,不然无法观察到结果。 |
| | | if current_quotes_buy[0][1] * current_quotes_buy[0][0] < 1000000: |
| | | logger.info( |
| | | logger_info( |
| | | f"【开盘临机】【炸板风险!!】【{k_line_data[0]['sec_name']}】 买盘金额小于100万! 买一额:【{current_quotes_buy[0][1]}】,当日当时量:{current_volume}") |
| | | if current_volume < k_line_data[0]['volume'] * 0.6: |
| | | logger.info( |
| | | logger_info( |
| | | f"【开盘临机】【 炸板!!且当日量不足】【{k_line_data[0]['sec_name']}】 买盘小于1万 且 今日量小于昨日量的 0.6,设定委卖数量【十分之一仓】,当日当时量:{current_volume}") |
| | | # 设定委卖数量【十分之一仓】 |
| | | order_methods.sell_order_by_part_volume(0.1, symbol, |
| | |
| | | k_line_data[0]['sec_name'], |
| | | index) |
| | | else: |
| | | logger.info(f"【开盘临机】【{k_line_data[0]['sec_name']}】 涨停封板!!") |
| | | logger_info(f"【开盘临机】【{k_line_data[0]['sec_name']}】 涨停封板!!") |
| | | |
| | | ''' |
| | | 下面是目前看来更有效的板上盯卖 |
| | | ''' |
| | | # 如果 卖一 量 为零 |
| | | if current_quotes_sell[0][1] * current_quotes_sell[0][0] == 0: |
| | | logger.info( |
| | | logger_info( |
| | | f"【开盘临机】【强势封板!!!】【{k_line_data[0]['sec_name']}】 买一总金额:{round(current_quotes_buy[0][1] * current_quotes_buy[0][0] / 10000, 2)} 万,当日当时量:{current_volume}") |
| | | else: |
| | | if current_volume < k_line_data[0]['volume'] * 0.6: |
| | | logger.info( |
| | | logger_info( |
| | | f"【开盘临机】【 炸板中!!且当日量不足】【{k_line_data[0]['sec_name']}】 卖一数量不等于0,设定委卖数量【十分之一仓】,当日当时量:{current_volume}") |
| | | order_methods.sell_order_by_part_volume(0.1, symbol, |
| | | position_volume_yesterday, |
| | |
| | | index) |
| | | # 如果 卖二 量炸出来了,那么就是彻底炸开了。 |
| | | if current_quotes_sell[1][1] != 0: |
| | | logger.info( |
| | | logger_info( |
| | | f"【开盘临机】【 炸板炸开了!!】【{k_line_data[0]['sec_name']}】 卖二数量不等于0,设定委卖数量【十分之二仓】,当日当时量:{current_volume}") |
| | | order_methods.sell_order_by_part_volume(0.2, symbol, |
| | | position_volume_yesterday, |
| | |
| | | k_line_data[0]['sec_name'], |
| | | index) |
| | | if current_volume < k_line_data[0]['volume'] * 0.8: |
| | | logger.info( |
| | | logger_info( |
| | | f"【开盘临机】【 炸板!!且当日量不足】【{k_line_data[0]['sec_name']}】 买盘小于1万 且 今日量小于昨日量的 0.8,当日当时量:{current_volume}") |
| | | # 该股加入到板上盯卖的集合中 所以设定卖出全仓 |
| | | if symbol in data_cache.LIMIT_UP_SELL_CODES: |
| | | logger.info( |
| | | logger_info( |
| | | f"【开盘临机】【 炸板!!且当日量不足】【{k_line_data[0]['sec_name']}】 板上盯卖 |开启| 设定委卖【全仓】") |
| | | order_methods.sell_order_by_part_volume(1, symbol, |
| | | position_volume_yesterday, |
| | |
| | | k_line_data[0]['sec_name'], |
| | | index) |
| | | else: |
| | | logger.info( |
| | | logger_info( |
| | | f"【开盘临机】【 炸板!!且当日量不足】【{k_line_data[0]['sec_name']}】 板上盯卖 |关闭| 设定委卖【十分之一仓】") |
| | | order_methods.sell_order_by_part_volume(0.1, symbol, |
| | | position_volume_yesterday, |
| | |
| | | # 进入当前最新价低于当日最低价 且 瞬时下跌 |
| | | if current_price <= current_low and tick_growth < -0.2: |
| | | # 进入昨日首板涨停视界(昨日涨停但前日未涨停)且 当日当前量未超昨日量 |
| | | if k_line_data[0]['attribute'] in data_cache.limit_up_type and k_line_data[1]['attribute'] not in data_cache.limit_up_type and current_volume <= k_line_data[0]['volume']: |
| | | if k_line_data[0]['attribute'] in data_cache.limit_up_type and k_line_data[1][ |
| | | 'attribute'] not in data_cache.limit_up_type and current_volume <= \ |
| | | k_line_data[0]['volume']: |
| | | if today_limit_up_price != current_high or today_growth < 7: |
| | | logger.info( |
| | | logger_info( |
| | | f"【午盘决策】【昨日涨停】【当日未涨停 或 当日当时涨幅小于7%】【{k_line_data[0]['sec_name']}】 设定委卖数量【十分之五仓】,当日当时涨幅为{today_growth}。最新价::{current_price},昨日收盘价:{k_line_data[0]['close']}") |
| | | order_methods.sell_order_by_part_volume(0.5, symbol, position_volume_yesterday, |
| | | order_methods.sell_order_by_part_volume(0.5, symbol, |
| | | position_volume_yesterday, |
| | | current_price, |
| | | k_line_data[0]['sec_name'], index) |
| | | # 当前时间超过平仓时间【尾盘决断】 |
| | | if now_time > data_cache.CLOSE_POSITION_TIME: |
| | | if today_limit_up_price != current_high or today_growth < 7: |
| | | logger.info( |
| | | logger_info( |
| | | f"【尾盘决断】【当日未涨停 或 当日当时涨幅小于7%】【{k_line_data[0]['sec_name']}】 设定委卖数量【全仓】,当日当时涨幅为{today_growth}。最新价::{current_price},昨日收盘价:{k_line_data[0]['close']}") |
| | | order_methods.sell_order_by_part_volume(1, symbol, position_volume_yesterday, |
| | | current_price, |
| | | k_line_data[0]['sec_name'], index) |
| | | |