I have coded an indicator 'MyCapFloor' that returns two different DataSeries:
- MyCapFloor.Resistance
- MyCapFloor.Support
I would like to add each of these series to a strategy as plots that I can inspect in the Strategy Analyzer Chart.
I have added the following code in the Initialize() method of my strategy:
MyCapFloor.Resistance.Indicator.Panel=0;
Add(MyCapFloor.Resistance.Indicator);
MyCapFloor.Resistance.Indicator.Plots[0].Pen.Color=Color.Blue;
It compiles without errors but it doesn't plot to the Chart after backtesting the strategy.
In order to investigate this I have crated another indicator 'MyResistance' which returns the same values as in 'MyCapFloor.Resistance' but under a unique dataseries. Now my code looks like:
MyResistance.Indicator.Panel=0;
Add(MyResistance.Indicator);
MyResistance.Indicator.Plots[0].Pen.Color=Color.Blue;
It compiles and it does show the plot I was expecting in the Chart of the strategy analyser.
How can I get each of the dataseries returned by MyCapFloor indicator plotted in a strategy?
thanks
Maese
Comment