I'd like to try to get volume of the same bar of yesterday's session using this piece of code:
TimeSpan oneday = new TimeSpan(24, 00, 00);
Print("\n" + Time[0].ToString());
int barsAgo1 = Bars.GetBar(Time[0].Subtract(oneday));
Print(Time[barsAgo1].ToString() +" " + Volume[barsAgo1].ToString());
the output, that gets produced puzzles me a bit. It's the volume of the bar, but two weeks ago.
13/04/2020 18:35:00
30/03/2020 18:35:00 11201
13/04/2020 18:40:00
30/03/2020 18:40:00 8834
13/04/2020 18:45:00
30/03/2020 18:45:00 6992
Any ideas, what is wrong?
Many thanks.
Thomas
Comment