Number of bars in Daily Timeframe
Number of bars in Daily Timeframe
25 Apr 2019, 09:09
Hi Panagiotis
How do I find a number of bars in a daily Timeframe
Regards,
Alexander
Replies
PanagiotisCharalampous
25 Apr 2019, 10:09
Hi Sasha,
I haven't tried it but should work for m1 bars.
Best Regards,
Panagiotis
@PanagiotisCharalampous
alexander.n.fedorov
25 Apr 2019, 14:02
RE:
Panagiotis Charalampous said:
Hi Sasha,
I haven't tried it but should work for m1 bars.
Best Regards,
Panagiotis
It does not work
this one works:
barMinutes= (int)ms.OpenTime.Last(0).ToUniversalTime().Subtract(ms.OpenTime.Last(1).ToUniversalTime()).TotalMinutes;
Regards
@alexander.n.fedorov
alexander.n.fedorov
25 Apr 2019, 09:28
Should this work:
ms = MarketData.GetSeries(TimeFrame);
int barminutes = (ms.OpenTime.Last(0).TimeOfDay - ms.OpenTime.Last(1).TimeOfDay).Minutes;
int numBarsInDay = (int)barminutes;
Regards,
Sasha
@alexander.n.fedorov