There are already other indicators out there but I wanted to implement an extra piece of functionality - what I'm saying is that the other indicators don't do what I need and also don't suffer my current problem.
The current problem stems from how I restart the numbering on sessions - the following code snippet comes from the Plot() method, hence the Bars.Get()
if (Bars.Get(x).FirstBarOfSession)
{
sessionBar = baseBar;
}
else
{
sessionBar++;
}
This is fine until I change the interval to Daily. Then there is no FirstBarOfSession.
Without writing a big function to check which Period and Interval is in force, is there another way to check whether there is never a FirstBarOfSession = true?

Comment