| | |
| | | from third_data.history_k_data_util import HistoryKDatasUtils |
| | | from ths import l2_code_operate |
| | | from trade import trade_data_manager, l2_trade_util |
| | | from utils import global_util, tool, init_data_util |
| | | from trade.trade_manager import MarketSituationManager |
| | | from utils import global_util, tool, init_data_util, buy_condition_util |
| | | |
| | | __CodesPlateKeysManager = CodesHisReasonAndBlocksManager() |
| | | |
| | |
| | | limit_up_price, |
| | | volumes_data[:90])) |
| | | logger_first_code_record.info("{} 获取到首板60天最大量:{}", code, volumes) |
| | | code_volumn_manager.set_histry_volumn(code, volumes[0], volumes[1], volumes[2],volumes[3]) |
| | | code_volumn_manager.set_histry_volumn(code, volumes[0], volumes[1], volumes[2], volumes[3]) |
| | | |
| | | # 保存K线形态 |
| | | k_format = code_nature_analyse.get_k_format(limit_up_price, volumes_data) |
| | |
| | | is_special = True if k_format and k_format[8][0] else False |
| | | if not WantBuyCodesManager().is_in_cache(code): |
| | | if not is_special: |
| | | if global_util.zyltgb_map.get(code) and global_util.zyltgb_map.get(code) > 31 * 100000000: |
| | | situation = MarketSituationManager().get_situation_cache() |
| | | zylt_threshold_as_yi = buy_condition_util.get_zyltgb_threshold(situation) |
| | | if global_util.zyltgb_map.get(code) and global_util.zyltgb_map.get(code) > zylt_threshold_as_yi[1] * 100000000: |
| | | l2_trade_util.forbidden_trade(code, |
| | | f"无辨识度,自由流通市值({global_util.zyltgb_map.get(code) // 100000000})>31亿") |
| | | f"无辨识度,自由流通市值({global_util.zyltgb_map.get(code) // 100000000})>{zylt_threshold_as_yi[1]}亿") |
| | | continue |
| | | elif limit_up_price and float(limit_up_price) >= 50: |
| | | l2_trade_util.forbidden_trade(code, |
| | |
| | | l2_trade_util.forbidden_trade(code, "回踩不够") |
| | | continue |
| | | |
| | | |
| | | |
| | | if code_nature_analyse.is_up_too_high_in_10d_with_limit_up(volumes_data): |
| | | # 判断是否太高 |
| | | HighIncreaseCodeManager().add_code(code) |
| | |
| | | # l2_trade_util.forbidden_trade(code, "120天内股价长得太高") |
| | | # HighIncreaseCodeManager().add_code(code) |
| | | pass |
| | | |
| | | |
| | | |
| | | if code_nature_analyse.is_have_latest_max_volume(volumes_data, 2): |
| | | # 最近2天是否是最高量 |
| | |
| | | # if float(total_datas[buy_single_index]["val"]["price"]) >= 3 and cls.volume_rate_info[code][ |
| | | # 0] > 0.3 and sell_info[1] > 2000 * 10000 and int( |
| | | # tool.get_now_time_str().replace(":", "")) < int("100000"): |
| | | if sell_info[1] > 2000 * 10000: |
| | | situation = cls.__MarketSituationManager.get_situation_cache() |
| | | if sell_info[1] > 2000 * 10000 and situation != MarketSituationManager.SITUATION_GOOD: |
| | | # 市场行情好时不打折 |
| | | if code.find('00') == 0: |
| | | # 深圳首次下单打折 |
| | | place_order_count = trade_data_manager.PlaceOrderCountManager().get_place_order_count(code) |
| | |
| | | def test_trade(self): |
| | | trade_manager.TradeStateManager().open_buy() |
| | | threading.Thread(target=async_log_util.run_sync, daemon=True).start() |
| | | code = "002735" |
| | | code = "603135" |
| | | clear_trade_data(code) |
| | | l2.l2_data_util.load_l2_data(code) |
| | | total_datas = deepcopy(l2.l2_data_util.local_today_datas[code]) |
| | |
| | | # 是否需要注意 |
| | | need_pay_attention = (total_left_count <= 10 or total_left_num * float( |
| | | limit_up_price) * 100 < 1000 * 10000) and ( |
| | | real_place_order_after_count <= 10 or real_place_order_after_num * float( |
| | | limit_up_price) * 100 < 1000 * 10000) |
| | | real_place_order_after_count <= 10 or real_place_order_after_num * float( |
| | | limit_up_price) * 100 < 1000 * 10000) |
| | | fdata = {"code_info": (code, code_name), "total_num": total_nums, "finish_num": deal_or_cancel_num, |
| | | "buy1_money": output_util.money_desc(buy1_money), |
| | | "big_num_count": total_big_count, |
| | |
| | | # (最小流通,最大流通,优秀开始,优秀结束,最优开始,最优结束) |
| | | def get_zyltgb_threshold(market_sitation: int): |
| | | if market_sitation == MarketSituationManager.SITUATION_GOOD: |
| | | return 8.9, 100, 8.9, 50, 8.9, 19 |
| | | return 31, 100, 40, 100, 40, 80 |
| | | return 8.9, 31, 8.9, 25, 8.9, 19 |
| | | |
| | | |