| | |
| | | from third_data.history_k_data_util import HistoryKDatasUtils, JueJinApi |
| | | from trade import l2_trade_util |
| | | from settings.trade_setting import MarketSituationManager |
| | | from trade.buy_radical import new_block_processor |
| | | from trade.buy_radical.block_special_codes_manager import BlockSpecialCodesManager |
| | | from utils import global_util, tool, init_data_util, buy_condition_util |
| | | |
| | |
| | | if not volumes_data: |
| | | continue |
| | | volumes = init_data_util.parse_max_volume_new(code, volumes_data[:60]) |
| | | max_volume_in_5_days = init_data_util.parse_max_volume_in_days(volumes_data, 5) |
| | | max_volume_in_5_days, max_volume_day_in_5_days = init_data_util.parse_max_volume_in_days(volumes_data, 5) |
| | | |
| | | async_log_util.info(logger_first_code_record, f"{code} 获取到首板60天最大量:{volumes}") |
| | | code_volumn_manager.CodeVolumeManager().set_histry_volumn(code, volumes[0], volumes[1], volumes[2], |
| | | volumes[3], max_volume_in_5_days) |
| | | volumes[3], max_volume_in_5_days, |
| | | max_volume_day_in_5_days) |
| | | |
| | | # 保存K线形态 |
| | | k_format = code_nature_analyse.get_k_format(code, limit_up_price, volumes_data) |
| | |
| | | |
| | | if not WantBuyCodesManager().is_in_cache( |
| | | code) and not gpcode_manager.BuyOpenLimitUpCodeManager().is_in_cache(code): |
| | | need_forbidden = True |
| | | # 新题材破前高就不需要加黑 |
| | | if BlockSpecialCodesManager().get_code_blocks(code) and k_format and k_format[1]: |
| | | need_forbidden = False |
| | | # 新题材该拉黑还是拉黑 |
| | | need_forbidden = True #new_block_processor.is_can_forbidden(code) |
| | | if need_forbidden: |
| | | if code_nature_analyse.is_price_too_high_in_days(code, volumes_data, limit_up_price)[0]: |
| | | # 判断是否太高 |
| | |
| | | |
| | | if tool.is_ge_code(code) and float(limit_up_price) < 10: |
| | | l2_trade_util.forbidden_trade(code, "创业板股价10块内") |
| | | continue |
| | | |
| | | if len(k_format) > 14 and k_format[14]: |
| | | l2_trade_util.forbidden_trade(code, "昨日炸板") |
| | | l2_trade_util.forbidden_trade(code, "上个交易日涨停/炸板") |
| | | continue |
| | | |
| | | if len(k_format) > 15 and k_format[15]: |
| | | l2_trade_util.forbidden_trade(code, "上个交易日跌停") |
| | | continue |
| | | |
| | | if len(k_format) > 12 and k_format[12]: |
| | | l2_trade_util.forbidden_trade(code, "上个交易日振幅过大") |
| | | continue |
| | | |
| | | # if code_nature_analyse.is_continue_limit_up_not_enough_fall_dwon(code, volumes_data): |