i develop indicator in in NT8 b6
and have problem to work with multiple time frame
it looks that secondary Series is not generated
my code looks like this
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
Description = @"Enter the description for your new custom Indicator here.";
Name = "Test";
// bla bla
}
else if (State == State.Configure)
{
AddDataSeries(BarsPeriodType.Minute, 2);
}
}
protected override void OnBarUpdate()
{
if (BarsInProgress == 1)
{
chartBars1 = ChartControl.BarsArray[1];
}
}
while in indicator level i defined :
ChartBars chartBars1;
i get message : Error on calling 'OnBarUpdate' method on bar 2: You are accessing an index with a value that is invalid since it is out-of-range. as a result of command
chartBars1 = ChartControl.BarsArray[1];
in BarsArray was only one series the primary bars of the chart
what am i missing ?
Comment