Hi , guys when i was working with rolling frame , i got this error can u tell me how to solve it?

I was comparing current bar to past bar value . If the past bar value is than -10% than the current value SetHoldings(self.crypto, 1.00) 

but there was one obstacle , the runner gave this error :- Runtime Error: Trying to perform a summation, subtraction, multiplication or division between 'TradeBar' and 'float' objects throws a TypeError exception. To prevent the exception, ensure that both values share the same type.
at OnData
if currBar <= pastBar*-0.0001:
===
at Python.Runtime.PyObject.Invoke(PyTuple args in main.py: line 28 (Open Stacktrace)

Can anyone look into my problem?

from QuantConnect.Data.Market import TradeBar

CRYPTO = "BTCUSD"; BAR = 5  ; 
class CryptoConsolidator(QCAlgorithm):
     
    def Initialize(self):
        self.SetStartDate(2021, 4, 1)
        self.SetEndDate(2021,  5,  1)
        self.SetCash(1000) 
        self.crypto = self.AddCrypto(CRYPTO, Resolution.Minute,Market.FTX).Symbol
        self.window = RollingWindow[TradeBar](2)   

    def BarHandler(self, consolidated):
        self.Plot("BTCUSD",self.Securities[self.crypto].Price)
        
    def OnData(self, data):
        
        self.window.Add(data[CRYPTO])
        price = self.Securities[CRYPTO].Price   #2 

        if not self.window.IsReady : return  
        
        currBar = self.window[0]                     # Current bar had index zero.
        pastBar = self.window[1]                     # Past bar has index one.
        self.Log("Price: {0} -> {1} ... {2} -> {3}".format(pastBar.Time, pastBar.Close, currBar.Time, currBar.Close))
        
        if not self.Portfolio[self.crypto].Invested:
            if currBar <= pastBar*-0.001:
                self.SetHoldings(self.crypto, 1.00 , "buy")

        elif self.Portfolio[self.crypto].Invested:
            if currBar >= pastBar*0.001:
                self.Liquidate(self.crypto,"sell")