Of the following which is more accurate for resetting variables at the start of the session?
if(Time[0].Date != Time[1].Date)
{
reset vars here
}
or
if ( Bars.SessionBreak )
{
reset vars here
}
or
if (Bars.FirstBarOfSession)
{
reset vars here
}
If I am using 'BarsSinceSession' then on a 5min chart is the 9:35 close of that bar yield BarsSinceSession=1?
or would it be more accurate
if ( Time[0]=935)
{
} or something like that
Can one use modulo arithmetic withe BarsSinceSession ? for example every 3 bars get the high and low of the last 3 5min bars i.e 15min high and low range?
if ((BarsSinceSession % 3) == 0) //9:45 High and Low of Range
{
FIF_HIGH = HighestBar(High, 3)
FIF_LOW = LowestBar(Low, 3)
}
or should I use
if (Time[0]=945)
//9:45 High and Low of Range
{
FIF_HIGH = HighestBar(High, 3)
FIF_LOW = LowestBar(Low, 3)
}
Please advise
Thanks
Comment