DayofWeek issues in a Rotation strategy

@Meme FIRST: Please use the forum properly and read this first! If you don't enter your code properly we can not help you.

It is of utmost importance as improperly formatted code results in syntax errors. Start code block with three back-ticks and end the code block with three back-ticks too,

copy and past your code in here

Back tick key is located at the upper left corner of any keyboard (just below ESC and left to 1key). Don't paste screen captures of code, it can't be copied into our AmiBroker editor for testing.

Second: welcome to the forum

Third: I tried your code and it works for me so i don't know what you are seeing.

Fourth: what do you intend to do on Friday's that are statutory holidays and the markets are closed? Skip rotation that week?