Hope somebody can help me with this simple condition (shame on me I don’t know myself):
===========================================
ROCper1 = Param(“ROC period1”,200,20,200,5);
ROCper2 = Param(“ROC period2”,50,20,200,5);
IndexCode = ParamStr(“Index Symbol”,”$SPX”);
Index = Foreign(Indexcode,”C”);
IndMA = Param(“Index Filter MA”,200,20,200,1);
IndexFilterUp = Index > MA(Index,IndMA);
ROCper = IIf(IndexFilterUp,ROCper1,ROCper2);
ROClimit = Param(“ROC limit”,10,0,20,1);
Cond1 = C > LongMA;
Cond2 = ROC(C,ROCper) < ROClimit;
Cond3 = Rank > limit;
===========================================
I get an error on Cond2. It says that ROCper should be a number but is an array. However, when I pull in ROCper in the interpretation window, I do get the expected numbers (200,50).
Any thoughts?
Cheers. Daniel