Administrator
2022-10-27 6e71fbcb119e7068ba35380edaa5cc66e7c71f1b
trade_queue_manager.py
@@ -47,9 +47,16 @@
        return val[0], val[1]
    # 返回是否需要更新数据
    def save(self, code, time_str, volumn):
    def save(self, code, time_str, volumn,price):
        # 客户端数据未加载出来过滤
        if volumn < 1:
            return False
        # 判断是否为涨停价
        limit_up_price = gpcode_manager.get_limit_up_price(code)
        if limit_up_price != tool.to_price(decimal.Decimal(price)):
            # 非涨停价
            volumn = 0
        # 不保存和上一次相同的数据
        if code in self.__last_data and self.__last_data[code] == volumn:
            return False
@@ -112,10 +119,7 @@
        limit_up_price = gpcode_manager.get_limit_up_price(code)
        if limit_up_price != tool.to_price(decimal.Decimal(price)):
            # 非涨停价
            return False
        if volumn < 1:
            return False
            volumn = 0
        # 不保存和上一次相同的数据
        if code in self.__last_data and self.__last_data[code] == volumn:
            return False