Hi, I'm trying to know, while I'm using tick(), how many minutes has been since the bar started. Probably what I need is minutesWithin(), but I'm not using it correctly, I think. If I have BarPeriod=2, and I call minutesWithin from inside a tick() function , I should get (AFAIK) only values of 0, 1 or 2 as much. But I get the following values, depending on the parameters:

printf("n %f", minutesWithin(0));
results in a range from 377.424653 to 1.522134

I don't understand this value of 377 (as I'm using Barperiod=2 it shouldn't be higher than that).

I want just to calculate inside a tmf() or a tick() if in the next minute is going to run() a new bar. So for example I want, If I have a BarPeriod=120, and a tick is called repeated times during that bar, knowing if it is the minute 119 inside that bar.

I guess that minutesAgo() could be of help also, but I don't get how to use it.