Hello!

I cloned EmaCrossUniverseSelectionAlgorithm.py and tweaked the CoarseSelection Function and Symbol Data in the following manner: 

def CoarseSelectionFunction(self, coarse):     for stocks in coarse:         if stocks.Symbol not in self.Initial_Universe:     self.Initial_Universe[stocks.Symbol] = SymbolData(stocks.Symbol , stocks.Volume, stocks.DollarVolume)         #Updates the SymbolData object with current EOD price and volume         Hist_Data = self.Initial_Universe[stocks.Symbol]         Hist_Data.update(stocks.EndTime, stocks.Price, stocks.Volume , stocks.DollarVolume)              Filtered_Universe = list(filter(lambda x: x.Stock_Tradable , Initial_Universe.Filtered_Universe()))              #Then, sort the stocks according to the highest RSI:     Filtered_Universe.sort(key=lambda x: x.RS_Index, reverse=True)            return [i.Symbol for i in Filtered_Universe]class SymbolData(object): def __init__(self, symbol, Volume, DollarVolume): self.Symbol = Symbol self.Volume = Volume self.DollarVolume = DollarVolume self.RS_Index_1 = self.RelativeStrengthIndex(3) self.MinVolume = self.Minimum(50) self.MinDollarVolume = self.Minimum(50) self.Eod_Close = self.Securities(self.Symbol).Close self.Stock_Tradable = False self.RS_Index = 0 def update(self, time, value, Volume, DollarVolume): if self.RS_Index.Update(time, value) and self.MinVolume.Update(time, Volume) and self.MinDollarVolume.Update(time, DollarVolume): Min_Volume_Share = self.MinVolume.Current.Value Min_Volume_Dollar = self.MinDollarVolume.Current.Value RS_Index_2 = self.RS_Index_1.Current.Value Close_Price = self.Eod_Close.Current.Value self.Stock_Tradable = self.Eod_Close > 1 and Min_Volume_Share > 500000 and Min_Volume_Dollar > 2500000 if self.Stock_Tradable: self.RS_Index = RS_Index_2

 However, I got the following error:

Runtime Error: AttributeError : 'int' object has no attribute 'Update' at CoarseSelectionFunction in main.py:line 92 at update in main.py:line 231 AttributeError : 'int' object has no attribute 'Update'

How can I fix this? Responses will be appreciated.

 

PS: 

line 92 refers to the following code: Hist_Data.update(stocks.EndTime, stocks.Price, stocks.Volume, stocks.DollarVolume)

Line 231 refers to the following code: if self.RS_Index.Update(time, value) and self.MinVolume.Update(time, Volume) and self.MinDollarVolume.Update(time, DollarVolume):

Author