| | |
| | | if code not in self.__total_sell_datas_dict: |
| | | return 0 |
| | | if threshold_money: |
| | | return int(sum([x[2] if x[2]>=threshold_money else 0 for x in self.__total_sell_datas_dict[code]])) |
| | | return int(sum([x[2] if x[2] >= threshold_money else 0 for x in self.__total_sell_datas_dict[code]])) |
| | | else: |
| | | return int(sum([x[2] for x in self.__total_sell_datas_dict[code]])) |
| | | |
| | |
| | | money = data[2] * data[1] |
| | | if code not in cls.__dealing_order_info_dict: |
| | | # 数据格式[订单号,总股数,成交金额,成交开始时间,成交结束时间, 最近的成交价格, 最近的卖单号, 涨停价成交金额] |
| | | cls.__dealing_order_info_dict[code] = [data[6], data[2],money, data[3], data[3], data[1], |
| | | cls.__dealing_order_info_dict[code] = [data[6], data[2], money, data[3], data[3], data[1], |
| | | data[7], 0] |
| | | if is_limit_up: |
| | | cls.__dealing_order_info_dict[code][7] += money |
| | |
| | | @return: |
| | | """ |
| | | # 涨停价成交的大单(策略进程尚未统计到的) |
| | | |
| | | # 炸板时间附近的订单号 |
| | | |
| | | # RadicalCodeMarketInfoManager |
| | | # 如果炸过板就取炸板时间之前的第一个订单号作为最大订单号 |
| | | opened_time = RadicalCodeMarketInfoManager().get_opened_time(code) |
| | | total_deal_buy_money = 0 |
| | | total_deal_buy_money_info_list = [] |
| | | limit_up_price_money_list = [] |
| | | pre_limit_up_price_money_list = [] |
| | | deal_order_ids = BigOrderDealManager().get_total_buy_order_ids(code) |
| | | deal_order_list = BigOrderDealManager().get_total_buy_data_list(code) |
| | | deal_order_ids = set() |
| | | for x in deal_order_list: |
| | | if opened_time and int(opened_time.replace(":", "")) > int( |
| | | l2_huaxin_util.convert_time(x[3]).replace(":", "")): |
| | | # 开板时间之前 |
| | | continue |
| | | deal_order_ids.add(x[0]) |
| | | for info in buy_money_list: |
| | | if info[1] != limit_up_price: |
| | | continue |
| | |
| | | return True |
| | | return False |
| | | |
| | | def get_opened_time(self, code): |
| | | """ |
| | | 获取炸板时间 |
| | | @param code: |
| | | @return: |
| | | """ |
| | | data = self.__code_limit_up_info_dict.get(code) |
| | | if data: |
| | | return data[1] |
| | | return None |
| | | |
| | | def is_almost_open_limit_up(self, code): |
| | | """ |
| | | 是否即将炸板 |