Since we have to hardcode dataseries. Can we use bools and then based on bools we can select highertime frame? something like below?
else if (State == State.Configure)
{
// Adds a secondary bar object to the indicator
AddDataSeries(BarsPeriodType.Minute, 5);
AddDataSeries(BarsPeriodType.Minute, 60);
AddDataSeries(BarsPeriodType.Minute, 240);
}
protected override void OnBarUpdate()
{
if (CurrentBars[0] < 1 || CurrentBars[1] < 1)
return;
if(5minbool)
{
if (BarsInProgress == 1)
{logic here
}
}
if(60minbool)
{
if (BarsInProgress == 3)
{
}
}
if(240minbool)
{
if (BarsInProgress == 3)
{
}
}
}

Comment