I'm trying to include the duration of a volume bar in my custom strategy.
I've looked into the "time" function, but it seems to only return timestamp values of bars.
What I'd like to do is to get the duration (in seconds) of a Volume Bar, but I'm at a loss regarding the right syntax and the correct use of the time function:
if (time Close[0] - time Open[0] < x seconds
{
BarDuration= true;
}
else
{
BarDuration= false;
}
I'd very much appreciate if someone could point me in the right direction.
Thanks & Regards
Comment