| | |
| | | |
| | | # 统计所有的成交量 |
| | | __deal_volume_list_dict = {} |
| | | # 统计主动买的成交量 |
| | | # 统计涨停主动买的成交量 |
| | | __deal_active_buy_volume_list_dict = {} |
| | | |
| | | @classmethod |
| | | def statistic_total_deal_volume(cls, code, datas): |
| | | def statistic_total_deal_volume(cls, code, datas, limit_up_price): |
| | | # 只统计被动买 |
| | | if code not in cls.__deal_volume_list_dict: |
| | | cls.__deal_volume_list_dict[code] = [] |
| | |
| | | for d in datas: |
| | | # 只统计主动买 |
| | | if d[7] > d[6]: |
| | | continue |
| | | # 只统计涨停买 |
| | | if d[1] != limit_up_price: |
| | | continue |
| | | if d[3] in time_dict: |
| | | time_str = time_dict[d[3]] |
| | |
| | | total_sell_info[1] = big_sell_orders |
| | | # ----------------统计涨停主动买----------------- |
| | | try: |
| | | limit_up_active_buy_datas = [] |
| | | for d in datas: |
| | | if is_active_sell(d[7], d[6]): |
| | | # 被动买 |
| | |
| | | # 是否是涨停 |
| | | if d[1] == limit_up_price: |
| | | # 有涨停主动买 |
| | | L2TradeSingleDataManager.set_limit_up_active_buy(code, datas[-1][3], datas[-1][6]) |
| | | break |
| | | limit_up_active_buy_datas.append(d) |
| | | L2TradeSingleDataManager.set_limit_up_active_buy(code, limit_up_active_buy_datas) |
| | | except: |
| | | pass |
| | | |