I'm using sampleStrategyPlot and SampleMultiInstrument as reference to build my spread indicator but it stays blank in charts.
It seems like StrategyPlot(0).Value.Set does nothing...
Things i do:
1)I open a chart for ES 06-09 and add StrategyPlot(0) as indicator (i tried also without addind the indicator but nothig happens again).
2) i start my strategy on ES 06-09, inside my strategy i add ES 09-09.
Nothing happens!
Here the code...
protected override void Initialize()
{
CalculateOnBarClose = true;
Add("ES 09-09", PeriodType.Minute, 1);
Add(StrategyPlot(0));
StrategyPlot(0).Plots[0].Pen.Color = Color.Blue;
StrategyPlot(0).PanelUI = 2;
}
protected override void OnBarUpdate()
{
if (BarsInProgress != 0)
return;
StrategyPlot(0).Value.Set(Closes[1][0]-Closes[0][0]);
// StrategyPlot(0).Value.Set(1); //NOT WORKING EITHER!
}
I even tried the simple StrategyPlot(0).Value.Set(1)
or i tried to remove barsinprogress check
But nothing again!


Comment