I have a strategy that runs within the OnBarUpdate method and Calculate OnEachTick. I want to know how to obtain the current time each time the OnBarUpdate is executed. I know that by using DateTime.Now I can get the current time of the machine, which is perfect, but I need an equivalent for when the connection is Playback. I have tried using Time[0], but it only shows the date and time when the current candle will close.
Any ideas on how to do this?
Comment