Hey everyone, 

Having a hard time with the SMA of VIX data.  Should be pretty easy but I keep hitting errors.  Any help?

 

Thanks!

class vixsma (QCAlgorithm):

def Initialize(self):
self.SetStartDate(2022, 2, 15)
self.SetEndDate(2022, 2, 25)
self.vix = self.AddData(CBOE, "VIX").Symbol
self.vixsmatwenty = self.SMA(self.vix, 20)
self.vixsmafifty = self.SMA(self.vix, 50)

self.SetWarmUp(55)

def OnData(self, data):

vix = data.Get(CBOE, self.vix)
current = vix.Close

self.Plot("VIX Data", "VIX", current)
self.Plot("VIX Data", "VIX SMA20", self.vixsmatwenty)