I have developed strategies using Minute and Tick data series that uses BarsinProgress to
do actions within the bar successfully either with Historical and Real Time data...
BUT, when I try this using RANGE bars, there is not trigger of BarsinProgress (stays always at 0) in HISTORICAL data.
Is there a limitation to this using multiple data series that are Range Data?
Thanks for the tips and hints to this issue... I want to know before I start working around this issue.
G.
THIS WORKS :
else if (State == State.Configure)
{
//0 primary
AddDataSeries(Data.BarsPeriodType.Minute, (2)); //1
AddDataSeries(Data.BarsPeriodType.Minute, (4)); //2
AddDataSeries(Data.BarsPeriodType.Minute, (6)); //3
AddDataSeries(Data.BarsPeriodType.Tick, 1); //4
}
}
protected override void OnBarUpdate()
{
// wait for at least 1 bar to load
if (CurrentBars[0] > 1 )
{
if (BarsInProgress == 0) //find condition / trigger on primary bar.
{
Print("targetBlue ");
} // end barsinprogress 0
if (BarsInProgress == 4)
{
// this calculates on EVERY TICK
Print(""+isLong+" "+isShort);
} //end barsinprogress 4 Tick
} //end currentbars load
} // end onbarupdate
THIS DOES NOT WORK WITH HISTORICAL DATA but DOES WITH REAL TIME:
else if (State == State.Configure)
{
//0 primary
AddDataSeries(Data.BarsPeriodType.Range, 2); //1
AddDataSeries(Data.BarsPeriodType.Range, 4); //2
AddDataSeries(Data.BarsPeriodType.Range, 6); //3
AddDataSeries(Data.BarsPeriodType.Range, 1); //4
}
}
protected override void OnBarUpdate()
{
// wait for at least 1 bar to load
if (CurrentBars[0] > 1 )
{
if (BarsInProgress == 0) //find condition / trigger on primary bar.
{
Print("targetBlue ");
} // end barsinprogress 0
if (BarsInProgress == 4)
{
// this calculates on EVERY TICK
Print(""+isLong+" "+isShort);
} //end barsinprogress 4 Ticks
} //end currentbars load
} // end onbarupdate
Comment