I can't get a strategy to add two indicators to a NT8 30M chart using the following code:
...
else if (State == State.DataLoaded)
{
SpreadRatio1 = SpreadRatio(Close, 1, 1, true, @"YM 09-18 30M");
SpreadRatio1.Plots[0].Brush = Brushes.ForestGreen;
SpreadRatio1.ScaleJustification =ScaleJustification.Overlay;
mySMA.Panel=2;
AddChartIndicator(SpreadRatio1);
mySMA =SMA(Close,14);
mySMA.Plots[0].Brush = Brushes.Yellow;
mySMA.ScaleJustification =ScaleJustification.Overlay;
mySMA.Panel=2;
AddChartIndicator(mySMA);
….
I have a 30M candlestick chart with two data series ES 09-18 30M (Panel 1) and YM 09-18 30M (Panel 2) running a strategy (see chart 1 attached). The strategy attempts to adds two indicators to that chart. One of the indicators is the standard SMA indicator and the other indicator is a custom indicator called SpreadRatio. Instead of adding the two indicators to Panel 3 as desired, the strategy is incorrectly placing the SMA indicator in Panel 1 (see chart 2 attached) whilst SpreadRatio is correctly placed on Panel 3.
What have I done wrong?
Comment