| | |
| | | pass |
| | | return None, "" |
| | | |
| | | |
| | | # L撤 |
| | | def l_cancel(_buy_single_index, _buy_exec_index): |
| | | _start_time = round(t.time() * 1000) |
| | |
| | | if code in cls.volume_rate_info and cls.volume_rate_info[code][0] < 0.15: |
| | | return False, True, f"强势10分钟,上5个交易日跌停,量未达到{0.15}({cls.volume_rate_info[code][0]})" |
| | | |
| | | |
| | | # 获取量的参考日期 |
| | | if code in global_util.max60_volumn: |
| | | day = global_util.max60_volumn[code][1] |
| | |
| | | order_begin_pos.count = 0 |
| | | order_begin_pos.buy_single_index = buy_single_index |
| | | if order_begin_pos.sell_info: |
| | | k_format = code_nature_analyse.CodeNatureRecordManager().get_k_format_cache(code) |
| | | if k_format and (k_format[1][0] or k_format[3][0]): |
| | | # 股价新高或者逼近前高 |
| | | order_begin_pos.threshold_money = int(sell_info[1]) |
| | | else: |
| | | 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"): |
| | | # 暂时打8折 |
| | | # order_begin_pos.threshold_money = int(sell_info[1] * 0.8) |
| | | # 深证总卖大于1000万的票,m值打5折 |
| | | if code.find('00') == 0: |
| | | # k_format = code_nature_analyse.CodeNatureRecordManager().get_k_format_cache(code) |
| | | # if k_format and (k_format[1][0] or k_format[3][0]): |
| | | # # 股价新高或者逼近前高 |
| | | # order_begin_pos.threshold_money = int(sell_info[1]) |
| | | # else: |
| | | 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"): |
| | | # 暂时打8折 |
| | | # order_begin_pos.threshold_money = int(sell_info[1] * 0.8) |
| | | # 深证总卖大于1000万的票,m值打5折 |
| | | if code.find('00') == 0: |
| | | # 深圳首次下单打折 |
| | | place_order_count = trade_data_manager.PlaceOrderCountManager().get_place_order_count(code) |
| | | if place_order_count is not None and place_order_count == 0: |
| | | order_begin_pos.threshold_money = int(sell_info[1] * 0.6) |
| | | else: |
| | | order_begin_pos.threshold_money = int(sell_info[1] * 0.8) |
| | | order_begin_pos.threshold_money = int(sell_info[1]) |
| | | else: |
| | | order_begin_pos.threshold_money = int(sell_info[1]) |
| | | order_begin_pos.threshold_money = int(sell_info[1] * 0.8) |
| | | else: |
| | | order_begin_pos.threshold_money = int(sell_info[1]) |
| | | l2_log.debug(code, "获取到买入信号起始点:{} ,计算范围:{}-{} ,量比:{},是否板上买:{},数据:{} 模式:{}({})", buy_single_index, |
| | | compute_start_index, |
| | | compute_end_index, cls.volume_rate_info[code], order_begin_pos.at_limit_up, |
| | |
| | | try: |
| | | for d in datas: |
| | | if FCancelBigNumComputer().need_cancel(d)[0]: |
| | | L2TradeDataProcessor.cancel_buy(code, "F撤撤单") |
| | | L2TradeDataProcessor.cancel_buy(code, f"F撤撤单:{d}") |
| | | order_begin_pos = None |
| | | break |
| | | except Exception as e: |
| | |
| | | if current_shsz_rank < len(current_open_limit_up_codes) + max_rank: |
| | | return True, False, f"【{block}】前排代码:{current_shsz_rank}", is_strong_block |
| | | else: |
| | | k_format = code_nature_analyse.CodeNatureRecordManager().get_k_format_cache(code) |
| | | if k_format and k_format[8][0]: |
| | | # 具有辨识度 |
| | | return True, False, f"【{block}】具有辨识度", is_strong_block |
| | | # k_format = code_nature_analyse.CodeNatureRecordManager().get_k_format_cache(code) |
| | | # if k_format and k_format[8][0]: |
| | | # # 具有辨识度 |
| | | # return True, False, f"【{block}】具有辨识度", is_strong_block |
| | | # 看自由流通市值是否小于20亿 |
| | | if is_strong_block and current_shsz_rank < len(current_open_limit_up_codes) + max_rank + 1: |
| | | zyltgb = global_util.zyltgb_map.get(code) |
| | |
| | | from huaxin_client.client_network import SendResponseSkManager |
| | | from huaxin_client.trade_transform_protocol import TradeResponse |
| | | from l2 import l2_data_manager_new, l2_log, code_price_manager, l2_data_util, l2_data_manager, transaction_progress, \ |
| | | l2_data_source_util |
| | | l2_data_source_util, cancel_buy_strategy |
| | | from l2.cancel_buy_strategy import LCancelBigNumComputer, GCancelBigNumComputer, SecondCancelBigNumComputer, \ |
| | | LCancelRateManager |
| | | from l2.code_price_manager import Buy1PriceManager |
| | |
| | | fdatas.append(fdata) |
| | | result = {"code": 0, "data": fdatas} |
| | | self.send_response(result, client_id, request_id) |
| | | elif ctype == "set_real_place_order_index": |
| | | # 设置真实下单位置 |
| | | code = data["code"] |
| | | real_order_index = data["index"] |
| | | order_begin_pos = TradePointManager().get_buy_compute_start_data_cache(code) |
| | | if order_begin_pos is None or order_begin_pos.buy_exec_index is None or order_begin_pos.buy_exec_index < 0: |
| | | raise Exception("尚未下单") |
| | | cancel_buy_strategy.set_real_place_position(code, real_order_index, |
| | | buy_single_index=order_begin_pos.buy_single_index) |
| | | result = {"code": 0, "data": {}} |
| | | self.send_response(result, client_id, request_id) |
| | | |
| | | except Exception as e: |
| | | logging.exception(e) |
| | | self.send_response({"code": 1, "msg": f"数据处理出错:{e}"}, client_id, request_id) |