Overall Statistics
class VentralParticlePrism(QCAlgorithm):

        def Initialize(self):
            self.SetStartDate(2003, 1, 1)  # Set Start Date
            self.SetEndDate(2020, 7, 22)
            self.SetCash(250000000)  # Set Strategy Cash
            self.AddEquity("QQQ", Resolution.Minute)
            self.AddEquity("TQQQ", Resolution.Minute)
            self.AddEquity("UVXY", Resolution.Minute)
            self.vma = self.SMA("QQQ", 365, Resolution.Daily, Field.Volume)
    
            self.vmaSlope = MomentumPercent(12)
            
            self.BuyThreshold = ((self.vma.Current.Value)*(-0.123))*100
            self.SellThreshold = ((self.vma.Current.Value)*(-0.1))*100
    
            self.Schedule.On(
                self.DateRules.EveryDay("QQQ"),
                self.TimeRules.AfterMarketOpen("QQQ", 7),
                self.Derp)
            #Whenever I raise the number of minutes to anything over 10,
            #it places and cancels an order every single trading day throughout
            #the entire backtest. I don't understand this at all.
            self.SetWarmup(365)
        
        def OnData(self, data):
            if self.IsWarmingUp:
                return
            self.vmaSlope.Update(self.Time, self.vma.Current.Value)
    
        def Derp(self):
            if self.vmaSlope.Current.Value <= self.BuyThreshold:
                self.SetHoldings("TQQQ", 0)
                self.SetHoldings("QQQ", 1)
            self.SetHoldings("UVXY", 0)
            #self.Short == False
            #self.Long == True
        
            if self.vmaSlope.Current.Value >= self.SellThreshold:
                self.Liquidate("TQQQ")
                self.Liquidate("QQQ")