In replay/backtest, IExecute.Time for the exit's returns the "replay" time - not the computer clock so to speak. It returns the time that I see on the Market Replay control.
After an exit, if I want to see that at least X seconds passed before I enter a new trade, I can use DateTime.Now for a live environment.
How can I assess the current replay clock?
My code looks something like this:
Trade lastTrade = Performance.AllTrades[Performance.AllTrades.Count - 1];
DateTime lastExitTime = lastTrade.Exit.Time;
DateTime newEntryThresh = lastExitTime.AddSeconds(45);
if (DateTime.Compare(DateTime.Now, newEntryThresh) < 0)
{
return false;
}

Comment