PureBytes Links
Trading Reference Links
|
Jason's code worked fine. It was identical to what I came up
with. Checked it in my MS.
//Laguerre RSI
L0=0<FONT
size=2>;L1=0<FONT
size=2>;L2=0<FONT
size=2>;L3=0;
g=Param<FONT
size=2>("G"<FONT
size=2>,0.5<FONT
size=2>,0<FONT
size=2>,1<FONT
size=2>,0.05<FONT
size=2>);
for(i=<FONT color=#800080
size=2>1;i<<FONT color=#ff0000
size=2>BarCount;i++)
{
L0[i]=((1<FONT
size=2>-g)*C[i]) +
(g*L0[i-1]);
L1[i]=(-g*L0[i]) + L0[i-<FONT color=#800080
size=2>1] + (g*L1[i-<FONT color=#800080
size=2>1]);
L2[i]=(-g*L1[i]) + L1[i-<FONT color=#800080
size=2>1] + (g*L2[i-<FONT color=#800080
size=2>1]);
L3[i]=(-g*L2[i]) + L2[i-<FONT color=#800080
size=2>1] + (g*L3[i-<FONT color=#800080
size=2>1]);
}
cu= IIf<FONT
size=2>(L0>L1, L0-L1,0<FONT
size=2>) + IIf<FONT
size=2>(L1>L2, L1-L2,0<FONT
size=2>) + IIf<FONT
size=2>(L2>L3, L2-L3,0<FONT
size=2>);
cd= IIf<FONT
size=2>(L0<L1, L1-L0,0<FONT
size=2>) + IIf<FONT
size=2>(L1<L2, L2-L1,0<FONT
size=2>) + IIf<FONT
size=2>(L2<L3, L3-L2,0<FONT
size=2>);
temp= IIf<FONT
size=2>(cu+cd==0,
-1,cu+cd);
A1=IIf<FONT
size=2>(temp==-1<FONT
size=2>,0<FONT
size=2>,cu/temp);
C1=Param<FONT
size=2>("Grid Spacing"<FONT
size=2>,80<FONT
size=2>,50<FONT
size=2>,100<FONT
size=2>,1<FONT
size=2>)/100<FONT
size=2>;<FONT
color=#ff0000 size=2>
GraphXSpace=<FONT color=#800080
size=2>5;
Plot(A1,"Laguerre
RSI",<FONT color=#ff0000
size=2>colorRed,<FONT color=#800080
size=2>1);
PlotGrid(C1,<FONT face=Verdana
color=#ff0000 size=2>colorBlue);<FONT
color=#8b0000 size=2>
PlotGrid(<FONT color=#800080
size=2>1-C1,<FONT face=Verdana color=#ff0000
size=2>colorBlue);
-Corey Saxe
<BLOCKQUOTE
>
----- Original Message -----
<DIV
>From:
Ron Krebs
To: <A title=amibroker@xxxxxxxxxxxxxxx
href="">amibroker@xxxxxxxxxxxxxxx
Sent: Tuesday, December 09, 2003 5:14
PM
Subject: [amibroker] Re: Laguerre RSI
Indicator
Thanks again for all the helpful comments... So far the
AMA() and AMA2() have not done the job, but I will be thoroughly testing
them and will post the results if a succesful conversion is found.
Ron> > > Easy way for neuronaly challanged people
like me to remember...> > Z =(A*B)+(C*PREV);> >
can be written in AFL as:> > Z = AMA2( A(rray), B, C
);Send
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Yahoo! Groups Sponsor
ADVERTISEMENT
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|