| | |
| | | count -= total_datas[i]["re"] |
| | | return count |
| | | |
| | | # 将已经成交的过滤掉 |
| | | |
| | | @classmethod |
| | | def __filter_not_deal_indexes(cls, code, indexes): |
| | | trade_index, is_default = transaction_progress.TradeBuyQueue().get_traded_index(code) |
| | | if is_default: |
| | | return indexes |
| | | if trade_index is None: |
| | | return indexes |
| | | findexes = set() |
| | | for index in indexes: |
| | | if index < trade_index: |
| | | continue |
| | | findexes.add(index) |
| | | return findexes |
| | | |
| | | # 统计买入净买量,不计算在买入信号之前的买撤单 |
| | | @classmethod |
| | | def __sum_buy_num_for_order_3(cls, code, compute_start_index, compute_end_index, origin_num, origin_count, |
| | |
| | | buy_nums, threshold_num) |
| | | |
| | | max_buy_num_set_count = 0 |
| | | max_buy_num_set = cls.__filter_not_deal_indexes(code, max_buy_num_set) |
| | | for i1 in max_buy_num_set: |
| | | max_buy_num_set_count += total_datas[i1]["re"] |
| | | |
| | |
| | | not_buy_msg = f"【{i}】安全笔数不足,{buy_count}/{5}" |
| | | continue |
| | | |
| | | max_buy_num_set = cls.__filter_not_deal_indexes(code, max_buy_num_set) |
| | | if place_order_count == 0: |
| | | if len(max_buy_num_set) < 1: |
| | | not_buy_msg = f"【{i}】首次下单无大单" |