I am trying to add a second time frame to my strategy and am having a problem with "BarsSinceEntry" function.
Here is a sample of my code.
Add(PeriodType.Minute, SecondBars);
// Add a second time frame with a variable for the minute bar
(Position.MarketPosition != MarketPosition.Flat
&& BarsSinceEntry() >= BarsExit
)
{
ExitLong("BarsExitLong", "");
}
I get this : **NT** Error on calling 'OnBarUpdate' method for strategy 'PZeroFeb19/e0bb679a674947488a9c95fcab1139be': You must use the overload that has a 'BarsInProgress' parameter when calling the BarsSinceEntry() method in the context of a multi-time frame and instrument strategy.
Comment