| | |
| | | try: |
| | | referer_volume = code_volumn_manager.CodeVolumeManager().get_radical_buy_refer_volume( |
| | | code, limit_up_price) |
| | | today_volumn = code_volumn_manager.CodeVolumeManager().get_today_volumn(code) |
| | | expire_rate = f"{round(100 * total_left_num * 100 / (referer_volume - today_volumn), 2)}%" |
| | | today_volumn = code_volumn_manager.CodeVolumeManager().get_today_volumn_cache(code) |
| | | if referer_volume == today_volumn: |
| | | expire_rate = "100%" |
| | | else: |
| | | expire_rate = f"{round(100 * total_left_num * 100 / (referer_volume - today_volumn), 2)}%" |
| | | except: |
| | | pass |
| | | |
| | |
| | | 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 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 = 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]: |
| | | # 判断是否太高 |
| | |
| | | import os |
| | | |
| | | import constant |
| | | import l2_data_util |
| | | from db import mysql_data_delegate as mysql_data |
| | | from huaxin_client import l1_subscript_codes_manager |
| | | from third_data.kpl_data_constant import LimitUpCodesBlockRecordManager |
| | |
| | | if code not in self.__code_sell_money_dict: |
| | | self.__code_sell_money_dict[code] = [0, 0] |
| | | |
| | | if not tool.is_ge_code(code) and item[2][2] < 299e4: |
| | | return |
| | | if not tool.is_ge_code(code): |
| | | big_money = l2_data_util.get_big_money_val(item[2][4]) |
| | | if item[2][2] < big_money: |
| | | # 不是常规定义的大单就返回 |
| | | return |
| | | if tool.is_ge_code(code) and item[2][2] < 299e4 and item[2][1] < 290000: |
| | | return |
| | | if item[1] == 0: |
| | |
| | | # 加想买单要从黑名单移除 |
| | | trade_record_log_util.add_common_msg(code, "新题材移黑", block) |
| | | |
| | | # |
| | | |
| | | def is_can_forbidden(code): |
| | | """ |
| | | 是否可以拉黑 |
| | | @param code: |
| | | @return: |
| | | """ |
| | | if BlockSpecialCodesManager().get_code_blocks(code): |
| | | k_format = code_nature_analyse.CodeNatureRecordManager().get_k_format_cache(code) |
| | | if k_format and k_format[1]: |
| | | # 突破形态 |
| | | return False |
| | | return True |
| | |
| | | from third_data.code_plate_key_manager import KPLPlateForbiddenManager |
| | | from third_data.kpl_data_constant import LimitUpCodesBlockRecordManager, LimitUpDataConstant |
| | | from trade.buy_money_count_setting import BuyMoneyUtil |
| | | from trade.buy_radical import radical_buy_data_manager |
| | | from trade.buy_radical import radical_buy_data_manager, new_block_processor |
| | | from trade.buy_radical.block_special_codes_manager import BlockSpecialCodesManager |
| | | from trade.buy_radical.radical_buy_data_manager import RadicalBuyBlockManager, RadicalBuyDataManager |
| | | from utils import tool, import_util |
| | |
| | | if not result[0]: |
| | | if len(result) > 2 and result[2]: |
| | | # 可以拉黑 |
| | | l2_trade_util.forbidden_trade(code, result[1]) |
| | | if new_block_processor.is_can_forbidden(code): |
| | | l2_trade_util.forbidden_trade(code, result[1]) |
| | | return -1 |
| | | |
| | | # 想买单 |