Hi,

Could somebody point out how to create chain of indicators based on another indicator with more than one level of hierarchy?

1. I want to create indicator that shows deviation between correlated stocks

2. For this I create 4 movings averages, Slow and Fast MA for the stock #1 and Slow and Fast MA for the stock #2

DoubleExponentialMovingAverage iFma1 = DEMA(iSymbol1, iPeriodFast, Resolution.Hour);
DoubleExponentialMovingAverage iSma1 = DEMA(iSymbol1, iPeriodSlow, Resolution.Hour);
DoubleExponentialMovingAverage iFma2 = DEMA(iSymbol2, iPeriodFast, Resolution.Hour);
DoubleExponentialMovingAverage iSma2 = DEMA(iSymbol2, iPeriodSlow, Resolution.Hour);

3. Then I create Composite Indicator for each stock by subtracting FMA from SMA, now I have de-trended oscillators for each stock

CompositeIndicator<IndicatorDataPoint> iOsc1 = iSma1.Minus(iFma1);
CompositeIndicator<IndicatorDataPoint> iOsc2 = iSma2.Minus(iFma2);

4. Now I want deviation to be calculated based on the difference between these oscillators

var deviation = new StandardDeviation(15);
iDev = deviation.Of(iOsc2.Minus(iOsc1));

This is where I get an error Cannot implicitly convert from StandardDeviation to CompositeIndicator<IndicatorDataPoint>

Any thoughts?