Maybe a bug with the update of MarketData.GetBars
Maybe a bug with the update of MarketData.GetBars
05 May 2020, 18:35
Hi,
In advance, sorry English is not my first language, I'm still learning it :)
When you use this line of code : Print(((TimeSpan)(Bars.Last(0).OpenTime - MarketData.GetBars(TimeFrame.Daily, SymboleTraded).Last(1).OpenTime)).TotalMinutes);
SymboleTraded = "GBPJPY"
Time frame = h4
The line of code is in the OnBar()
In backtesting with the data of m1 bars from server (open prices)
the date of start is 01/12/2011
The bar in MarketData.GetBars(TimeFrame.Daily, SymboleTraded).Last(1) doesn't get updated when a weekend pass. Because the number of minutes continue to augment pass the 6 times. There is 6 bar of 4hours bar in one bar of 1 day. so we should see a reset each 6 bar, but there is no reset at the 6 bar when a weekend arrives. It reset after 12 bars. Or is it me that I'm doing something wrong ?
Thanks for your time !
Edit : found out that the bar start the friday at 22h, thats why it's show so much minutes. So it was me that was doing somthing wrong haha