I'm trying to reset certain variables at the beginning of each session. I'm running my strategy on a 60 min chart, but I also have 15 min and 1 min bars added to the strategy. I'm also running it with COBC = false.
I was trying this expression:
if (Bars.FirstBarOfSession && BarsInProgress == 2)
with BarsInProgress (2) being the 1 min bar. When looking at the output window though, I'm getting multiple resets for about the first 15 min, then the routine stops. My expectation is that it runs once and is done. Is it running on all the ticks during the first minute?
I also have part of my strategy running on FirstTickOfBar. Should I put the routine in there?
Thanks,
Rich

Comment