Can someone advise what is the best way to code for determining a new session and specifically, at the close of that first bar for the new session?
I had assumed I should use:
If (Bars.SessionBreak)
{ reset daily variables here}
However, it appears that SessionBreak is calling my code like a tick bar even though I have this indicator set to only update on close.
Specifically, getting High[0] during that event, which should be the high of the first days bar, is actually being set to the close of the first bar, implying it is calling SessionBreak like a tick situation where the last tick would be both the close and the "high".
I also tried some other time stuff with no luck...
Anyway, could someone please post the basic code for trapping the first bar of the day, at the close of that bar?
Thanks
Comment