I am trying to PLOT multiple instruments in my strategies. I have looked at the samples and docs and i think i have added the multi instruments correctly. However I dont know the syntax for drawing a plot line in the UI panels.
Here is my code structure:
protected override void Initialize()
{
CalculateOnBarClose = false;
Add("ZN 09-08", PeriodType.Minute, 1); //BarsArray 1
Add("^TRIN", PeriodType.Minute, 1); //BarsArray 2
Add(StrategyPlot(0));
StrategyPlot(0).Plots[0].Pen.Color = Color.YellowGreen;
StrategyPlot(0).PanelUI = 2;
Add(StrategyPlot(1));
StrategyPlot(1).Plots[0].Pen.Color = Color.YellowGreen;
StrategyPlot(1).PanelUI = 3;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
StrategyPlot(0).Value.Set(EMA(BarsArray[1],5)[0]);
StrategyPlot(1).Value.Set(Closes[2][0]);
}
What am i missing?
Cheers.

Comment