I try to test a very simpe strategy, buying on Monday and selling on Tuesday, but somehow I always get an error message. I used the strategy builder and clicked me through to the point "Conditions and Actions". There I built the following sets of conditions:
If (Times[0][0].DayOfWeek == DayOfWeek.Monday), then EnterLong(DefaultQuantity,"");
If (Times[0][0].DayOfWeek == DayOfWeek.Tuesday), then ExitLong(DefaultQuantity,"");
But when I press the "Compile"-button, I get the error message "Could not compile NinjaScript". The reason seems to be that my NinjaScript does not have a definition of "Monday" and "Tuesday" (this is what the Ninja Script Editor tells me). So do I have to define the days of the week myself (and how would I do that?) or what else am I doing wrong?

Comment