I am trying to perform rotational backtesting. I want the holdings to change at the end of every week instead of monthly. How can I code the weekly time rotation?
thanks in advance,
SetBacktestMode( backtestRotational ); LastDay = IIf( (Month() == Ref( Month(), 1) AND (Month() != Ref( Month(), 2)) ), 1, 0); aROC = ROC(Close, 30); SetOption("WorstRankHeld", 5); PositionScore = IIf(lastday, aROC, scoreNoRotate);