Having trouble with the following formula. If I calculate the value of adj and enter the numerical value into the z expression in place of adj, the formula works.
For example, if adj =10, and I enter 10 into the z expression "z=IIf(RBC>5,a,b+10);" the formula plots like I want. If I leave Adj in the z expression, the formula plots in a different (useless) way. mp=IIf(C,(H+L+C)/3,(H+L)/2); a=Ref(MA(mp,10),5); b=EMA(mp,10); adj=ValueWhen(rbc=6,a-b,1); RBC=LastValue(Cum(1))-Cum(1)+1; z=IIf(RBC>5,a,b+adj); Plot(z,"Extended Avg 10-3",colorRed,styleLine); Thanks
