I am a newbie and this is my first algo post.

I am  trying  to get the slope of an indicator to determine market trend. 

Maybe a more experienced eye can spot my error(s) and give some advice so that others can also learn from my mistakes

 I first tried

 1) to implement the indicator extentions

See code snippet 

        

        '''
        #####~~ indicator extensions begin ~~ uncomment the 3's
        #Tried to get the slope of the Chanel indicater by using the ROC of the indictor
        # the indicator extensions seems NOT working on these two indicators below 
        self.ROC = RateOfChange(18) 
        self.meanDCH = float(self.TestIndicator.Current.Value)
        self.IndicatorSlope = IndicatorExtensions.Of(self.ROC, self.meanDCH ) 
        #####~~ indicator extensions end  ~~ uncomment the 3's below and one line further on  line 95
        '''

2) My next effort was to use a rolling Window but I know I am missing something but cannot yet determine what..

		'''
        #####~~ Rolling Window begin ~~ uncomment the 3's above and below codesnipet
        # Try Rolling Window to determine the slope of the testindicztor
        self.dchWindow.Add(self.TestIndicator.Current.Value)
        currentDch = self.dchWindow[0]
        previousDch = self.dchWindow[1]
        self.IndicatorSlope = currentDch - previousDch
        #####~~ Rolling Window end ~~ uncomment the 3's below
        '''

Both 1) and 2) efforts gave the same error message: . 

[Trying to dynamically access a method that does not exist throws a TypeError exception]

So my inexperience shows the same mistake that seems still a blind spot for me.

 

3) My last SDF question. 
From your experience is it better to build a separate Alpha for say an uptrend market to trade with  another momentum Alpha or is it better to combine the momentum alpha and the trend Alpha in a single alpha?

See attached Backtest where my code snippets is commented out

Thanks for your patience with us newbies.