I am currently stuck trying to get symbol bars for different time windows, using the AlphaModel class from the Algorithm Framework.

The Update-method of my AlphaModel class is defined as follows:

def Update(self, algorithm, data):
        ''' Determines an insight for each security based on two annualized slopes
            algorithm: The algorithm instance
            data: The new data available
            The new insights generated'''
        insights = []
        #shortTermBars = GetDailyClosesForAllSymbolsInUniverse(self.shortTermMomentumWindow,self.resolution)
        #longTermBars = GetDailyClosesForAllSymbolsInUniverse(self.longTermMomentumWindow,self.resolution)
        return insights

How can I get the shortTermBars and the longTermBars for all symbols with the defined windows sizes resolutions, based on the data parameter?

Here is the complete code: