I'm trying to use a multi-bar series but I keep getting the "You must use the overload that has 'BarsInProgress' parameter" error when I try to execute the code. It looks like this:
protected override void Initialize()
{
CalculateOnBarClose = true;
Add("XXX", PeriodType.Day,1);
}
protected override void OnBarUpdate()
{
// Only run on real-time data
if (addHistoricalData==false)
{
if (Historical == true)
{
return;
}
}
if (CrossBelow(XXXX, XXXX))
{
if (BarsSinceEntry("Trade") > XXX)
{
EnterLong(1, DefaultQuantity, "Long");
}
}
if (BarsSinceEntry() >= XXXX)
{
ExitLong(1, "BarsExit", "Long");
}
}
Where do I need to add the BarsInProgress? If I want the first bars object (0) as the signal but then trade the second bars object (1), what do I need to do when I'm using the BarsSinceEntry/Exit?
Thank you,
Regards,
Lee
Comment