| | |
| | | return False, True, f"股价大于{constant.MAX_CODE_PRICE}块" |
| | | |
| | | if constant.L2_SOURCE_TYPE == constant.L2_SOURCE_TYPE_HUAXIN: |
| | | total_data = local_today_datas.get(code) |
| | | trade_price = current_price_process_manager.get_trade_price(code) |
| | | if trade_price is None: |
| | | return False, True, f"尚未获取到当前成交价" |
| | | if float(limit_up_price) - float(trade_price) > 0.00001: |
| | | return False, False, f"当前成交价({trade_price})尚未在0档及以内" |
| | | |
| | | # 计算信号起始位置到当前的手数 |
| | | buy_single_index, buy_exec_index, buy_compute_index, num, count, max_num_set, buy_volume_rate = cls.__get_order_begin_pos(code) |
| | | num_operate_map = local_today_num_operate_map.get(code) |
| | | total_num = 0 |
| | | for i in range(buy_single_index, total_data[-1]["index"] + 1): |
| | | data = total_data[i] |
| | | val = data["val"] |
| | | if not L2DataUtil.is_limit_up_price_buy(val): |
| | | continue |
| | | left_count = l2_data_source_util.L2DataSourceUtils.get_limit_up_buy_no_canceled_count(code, |
| | | data["index"], |
| | | total_data, |
| | | num_operate_map) |
| | | total_num += left_count * val["num"] |
| | | m_base_val = l2_trade_factor.L2PlaceOrderParamsManager.get_base_m_val(code) |
| | | thresh_hold_num = m_base_val//(float(gpcode_manager.get_limit_up_price(code))*100) |
| | | if total_num < thresh_hold_num * 2: |
| | | return False, False, f"当前成交价({trade_price})尚未在0档及以内 且 纯买额({total_num})小于2倍M值({thresh_hold_num*2})" |
| | | # 判断成交进度是否距离我们的位置很近 |
| | | total_data = local_today_datas.get(code) |
| | | trade_index, is_default = cls.__TradeBuyQueue.get_traded_index(code) |
| | | if False and not is_default and trade_index: |
| | | not_cancel_num = 0 |