I know lots of PREV functions.
 Should be able to remove some with the valuewhen function
 as instructed by Roy in previous posts.
 At least it is normalized from value from 0 - 100.
 

 

 {Laguerre RSI Normalized}
 g:=Input("g",.1,.9,0.5);
 L0:=((1-g)*C) + (g*PREV);
 L1:=(-g*L0) + Ref(L0,-1) + (g*PREV);
 L2:=(-g*L1) + Ref(L1,-1) + (g*PREV);
 L3:=(-g*L2) + Ref(L2,-1) + (g*PREV);
 

 cu:= If(L0>L1, L0-L1,0) + If(L1>L2, L1-L2,0) + If(L2>L3, L2-L3,0);
 cd:= If(L0<L1, L1-L0,0) + If(L1<L2, L2-L1,0) + If(L2<L3, L3-L2,0);
 

 temp:= If(cu+cd=0, -1,cu+cd);
 
 If(temp=-1,0,cu/temp)*100
 

Reply via email to