Hi All,

I'm having trouble updating the bolinger band indicator I'm using is this universe selection mode. I've following along with the EMA Cross Model, but it doesn't seem to work when substituting indicators with multiple values, such as the bolinger bands and keltner channels. The error I'm given is:

ArgumentException : Object of type 'System.RuntimeType' cannot be converted to type 'QuantConnect.Data.IBaseData'.   at System.RuntimeType.TryChangeType(Object value, Binder binder, CultureInfo culture, Boolean needsSpecialCast)   at System.Reflection.MethodBase.CheckArguments(Object[] parameters, Binder binder, BindingFlags invokeAttr, CultureInfo culture, Signature sig)   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)   at Python.Runtime.MethodBinder.Invoke(IntPtr inst, IntPtr args, IntPtr kw, MethodBase info, MethodInfo[] methodinfo)  at Update    return self.BollingerBands.Update(time in Universe.py: line 77

Can anyone demonstrate how to update bolinger bands in universe selection? Code is as follows:

from Selection.FundamentalUniverseSelectionModel import FundamentalUniverseSelectionModel

class KeltnerBollingerSelectionModel(FundamentalUniverseSelectionModel):
   '''Implements a universe of stocks based on the bollinger bands being completed encased
   by the keltner channels'''
   

   def __init__(self, period = 20, bollingerKFactor = 2, keltnerKFactor = 1.5, movingAverageType = MovingAverageType.Simple, universeSettings = None):
       '''Intializes a new instance of the KeltnerBollingerSelectionModel class
       Args:
           period: Keltner and Bollinger period
           bollingerKFactor: bollinger standard deviation
           keltnerKFactor: keltner ATR multiplier
           universeSettings: The settings used when adding symbols to the algorithm, specify null to use algorithm.UniverseSettings'''
       
       super().__init__(False, universeSettings)
       self.period = period
       self.bollingerKFactor = bollingerKFactor
       self.keltnerKFactor = keltnerKFactor
       self.movingAverageType = movingAverageType
       
       #holds the coarse fundamental indicators by symbol
       self.data = {}
       
   def SelectCoarse(self, algorithm, coarse):
       '''Defines the coarse fundamental selection function.
       Args:
           algorithm: The algorithm instance
           coarse: The coarse fundamental data used to perform filtering</param>
       Returns:
           An enumerable of symbols passing the filter'''
       
       filtered = []
       
       for cf in coarse:
           if cf.Symbol not in self.data:
               self.data[cf.Symbol] = self.SelectionData(cf.Symbol, self.period, self.bollingerKFactor, self.keltnerKFactor, self.movingAverageType)
               
           #grab the selection data instance for this symbol
           data = self.data.get(cf.Symbol)
           
           if data.Update(cf.Endtime, cf.Value) and data.IsIn:
               filtered.append(data)
               
       return [x.Symbol for x in filtered]
       

   class SelectionData:
       def __init__(self, symbol, period, bollingerKFactor, keltnerKFactor, movingAverageType):
           self.Symbol = symbol
           self.BollingerBands = BollingerBands(period, bollingerKFactor, movingAverageType)
           self.KeltnerChannels = KeltnerChannels(period, keltnerKFactor, movingAverageType)
           
       @property
       def BollingerUpper(self):
           return float(self.BollingerBands.UpperBand.Current.Value)
           
       @property
       def BollingerLower(self):
           return float(self.BollingerBands.LowerBand.Current.Value)
           
       @property
       def KeltnerUpper(self):
           return float(self.KeltnerChannels.UpperBand.Current.Value)
           
       @property
       def KeltnerLower(self):
           return float(self.KeltnerChannels.LowerBand.Current.Value)
           
       #computes when the bollinger bands are inside the keltner channels, returning true
       @property
       def IsIn(self):
           return (self.BollingerUpper < KeltnerUpper) and (BollingerLower > KeltnerLower)
           
       #updates the keltner channels and bollinger bands, returning true when they're both ready
       def Update(self, time, value):
           return self.BollingerBands.Update(time, value) and self.KeltnerChannels.Update(TradeBar)