I have a script I've been working with, it plots zigzags. One of the metrics I am collecting is the time between two points or bars.
Currently, I'm using something like this:
upClkTime = (int)(Time[CurrentBar-highBar].Subtract(Time[CurrentBar-dopenBar]).TotalMinutes);
What I will probably do, is create a loop to count back through the bars in between the points and add it up over each bar and report that result. But that is not the most elegant solution.
So I am wondering if there is a simpler way to do this, like a built-in NT method of collecting trading time that I am unaware of, before adding in my "brute-force" solution?
Thanks,
Forrest
Comment