Im having trouble, next code should return "First Bar Of Session" one time on the first bar of the session but returns "First Bar Of Session" 3 times every first bar of session.
My code:
Calculate = Calculate.OnEachTick;
protected override void OnBarUpdate()
{
if(IsFirstTickOfBar)
{
if(Bars.IsFirstBarOfSession)
{
Print("First Bar Of Session");
}
}
}
The code is printing "First Bar Of Session" in the 3 first bars (please find attached).
Should print one time, only in the first bar of the session. Can the calculate mode affect this? I need to use OnEachTick.
Thank you somuch
Comment