I'm trying to get the timestamp for daily bars, but it seems the GetTime function return the previous day date but not the current.
The sample code:
..... Calculate = Calculate.OnEachTick; .... protected override void OnBarUpdate() { DateTime time = Bars.GetTime(CurrentBar); Print(String.Format("CurrentBar={0}, Time[0]={1}, GetTime={2}", CurrentBar, Time[0], time)); }
on intraday timeframes the Time[0] matches the result of GetTime function, but on daily chart of higher this values doesn't match. Is there any workaround?
Thank you!
Comment