Hi FP
Here's some slightly altered non-PREV Laguerre RSI Normalized code that I
created for MSTT subscribers a while back. The only change I've made to it
today is to add "100*" to the output line so that it scales between 0 and
100 instead of 0 and 1. From memory I think the reason I used the MSTT DLL
EMA function instead of Mov(E) is that the Periods parameters are variables
rather than constants. Using LastValue() with Mov() might fix that if anyone
wanted to pursue the matter. Anyone who'd like a copy of the MSTT DLL
(created for me by Scott Bunny - aka Wabbit) to get this code working can
email me privately at [email protected].
Roy
{Laguerre RSI Normalized}
{Created from PREV-based code published by Equis}
{Roy Larsen, 2012-2014, 16/7/2014}
G:=Input("Laguerre RSI, Gamma",0,1,0.5);
R:=2/(1-G)-1;
A:=ExtFml("MSTT.EMA",C,R);
B:=ExtFml("MSTT.EMA",Ref(A,-1)-G*A,R)/(1-G);
J:=ExtFml("MSTT.EMA",Ref(B,-1)-G*B,R)/(1-G);
K:=ExtFml("MSTT.EMA",Ref(J,-1)-G*J,R)/(1-G);
U:=(A>B)*(A-B)+(B>J)*(B-J)+(J>K)*(J-K);
D:=(A<B)*(B-A)+(B<J)*(J-B)+(J<K)*(K-J);
R:=If(U+D=0,-1,U+D);
100*U*(R<>-1)/R;
_____
From: [email protected] [mailto:[email protected]]
Sent: Wednesday, 16 July 2014 1:37 p.m.
To: [email protected]
Subject: [EquisMetaStock Group] Laguerre RSI Normalized
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