When I use a command to Print(DateTime.Now.DayOfWeek), the output is correctly letting me know that today is Wednesday.
However, when I use a command to check if(DateTime.Now.DayOfWeek == Wednesday), I am receiving the error of "The name 'Wednesday' does not exist in the current context."
What can I do within Ninjascript to solve this problem? I have to use DateTime.Now, and I can not use ToDay(), as the former uses the time of my PC, while the latter uses the timestamp of the bar index, something that is not available on a Saturday or Sunday.
Thank you in advance for your time, I look forward to your answer.
Best wishes,
GLFX005
Solution: Sorry for the post, although I hope that this post may help others in the future. The problem was in my code. I had to write if(DateTime.Now.DayOfWeek == DayOfWeek.Wednesday).