Through the forum I have found the method of calculating an interval of time in minutes. However, the forum notes that BarsSinceEntry() is a more eloquent solution but how do I find out how long a bar is in minutes, so that I can do a test such as, are we 5 minutes since entry? That is, I could be running an algo on 1 minute or 30 minute time frame and the BarsSinceEntry() will not be the same in terms of time elapsed obviously. I believe the time version would be something like:
DateTime time1 = Time[BarsSinceEntry()];
DateTime time2 = Time[0];
TimeSpan interval = time2 - time1;
double minsSinceEntry = interval.TotalMinutes;
Cheers,
darmbk.
Comment