I cannot get the correct day of the week to return from backtesting. I have previously printed Debug() dates with no problem. However, the code below returns today's actual date, not the date of the simulated day in backtesting.

int day = (int)DateTime.Now.DayOfWeek; Debug(DateTime.Now.Date.ToShortDateString() + ": " + day);

Has anyone seen this? Do you have a workaround?

 

Thanks