Is there an existing way in NinjaScript to obtain the number of ticks that have occurred within a specified time period. I mean, "periods" tend to be specified in a number of ticks or bars. "Look back at the last 10 ticks/bars". But I want to know how many ticks have occurred in the last, say, 122 seconds, and that number will be potentially different each time, though simple in concept.
I'd like to use that info to plot a custom indicator on a tick chart that plots the highest high and lowest low of the last N seconds. I.e., rather than the last N ticks.
I've done this in EasyLanguage with For loops, and imagine that it could be done similarly in NinjaScript. But has this already been done some better way?
Thanks!
Comment