Rotational backtest - eliminate a symbol based on criteria

In a rotational backtest, is there a way to exclude a symbol from all of the others, based on criteria - such as below:

SetBacktestMode(backtestRotational);

mn = Month();
monthendflag = mn != Ref(mn,-1);

MAelim = 200;
mafilt= C>=MA(C, MAelim);

// HOW ELIMINATE THE SYMBOL HERE BASED ON MAFILT?


PositionScore = IIf(monthendflag, ROC(C,250), scorenoRotate);

Assign a score of zero if it does not pass your filter (make sure all pass scores are positive values).

SetBacktestMode(backtestRotational);

mn = Month();
monthendflag = mn != Ref(mn,-1);

MAelim = 200;
mafilt= C>=MA(C, MAelim);

xScore = IIf(mafilt, ROC(C,250), 0);

PositionScore = IIf(monthendflag, xScore, scorenoRotate);
4 Likes

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.