Hi everyone,

I'm new to QuantConnect and I have read through the docs. I am trying to implement a basic strategy that filters stocks with the highest market cap and then perform analysis on them using technical indicators to get trade signals. 

I have implemented the filter functions but I'm unsure of how to set up and update indicators like StandardDeviation(), EMA(), RSI() on the filtered equities (since this is usually done in the initialize method)

class FirstProject(QCAlgorithm):

def Initialize(self):
self.SetStartDate(2018, 1, 1)
self.SetEndDate(2018, 2, 1)
self.SetCash(10000)
self.AddUniverse(self.CoarseSelectionFunction, self.FineSelectionFunction)
self.UniverseSettings.Resolution = Resolution.Daily
#set up indicators?
self.symbols = []

def OnData(self, data):
#update indicators??
pass

def CoarseSelectionFunction(self, coarse):

self.symbols = [x.Symbol for x in coarse if x.HasFundamentalData and x.Price > 5]
return self.symbols

def FineSelectionFunction(self, fine):

market_cap = {}

for i in fine:
market_cap[i] = (i.EarningReports.BasicAverageShares.ThreeMonths *
i.EarningReports.BasicEPS.TwelveMonths *
i.ValuationRatios.PERatio)

sorted_market_cap = sorted([x for x in fine if market_cap[x] > 0], key=lambda x: market_cap[x], reverse=True)
self.symbols = sorted_market_cap[:10]
return self.symbols

 

Thanks!