class VentralParticlePrism(QCAlgorithm): def Initialize(self): self.SetStartDate(2012, 7, 17) # Set Start Date self.SetEndDate(2020, 7, 17) self.SetCash(250000000) # Set Strategy Cash self.AddEquity("QQQ", Resolution.Minute) self.AddEquity("TQQQ", Resolution.Minute) self.AddEquity("UVXY", Resolution.Minute) self.LongMAQQQ = self.SMA("QQQ", 730, Resolution.Daily) self.ShortMAQQQ = self.SMA("QQQ", 15, Resolution.Daily) self.SchlongMAQQQ = self.SMA("QQQ", 120, Resolution.Daily) self.SchortMAQQQ = self.SMA("QQQ", 29, Resolution.Daily) self.QuotientOne = (self.LongMAQQQ.Current.Value)/(self.ShortMAQQQ.Current.Value) self.QuotientTwo = (self.SchlongMAQQQ.Current.Value)/(self.SchortMAQQQ.Current.Value) #Here is my problem. self.SlopeAngleOne = self.MOMP(self.QuotientOne, 5) self.SlopeAngleTwo = self.MOMP(self.QuotientTwo, 28) #How do I calculate this? I want to find the momentum of this indicator over the given period. self.Schedule.On( self.DateRules.EveryDay("QQQ"), self.TimeRules.AfterMarketOpen(120), self.Derp) def Derp(self): if (self.SlopeAngleOne <= -0.001) and (self.SlopeAngleTwo <= 0.00033): self.SetHoldings("TQQQ", 0.8) self.SetHoldings("QQQ", 0) self.SetHoldings("UVXY", 0.08) elif self.SlopeAngleTwo >= 0.00033: self.SetHoldings("TQQQ", 0.3) self.SetHoldings("QQQ", 0.3) self.SetHoldings("UVXY", 0.15) else: self.SetHoldings("TQQQ", 0) self.SetHoldings("QQQ", 0) self.SetHoldings("UVXY", 0)

I just want to find the percentage change in the Quotients' values over the selected number of days. Thanks in advance for any help!