[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Laguerre RSI Indicator



PureBytes Links

Trading Reference Links

I have found the Laguerre RSI indicator to be a valuable device with 
MetaStock but have been unsuccesful converting it to AB.  This is 
primarily because I have not been able to duplicate the MS 'Prev' 
function after trying every permutation of the AB 'Ref()' function I 
can think of.  The MS code follows and perhaps some astute AB user 
will be more succesful than I in achieving a working conversion.

g:=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)

Thanks for your interest,
Ron - Mission Viejo, CA





------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 http://docs.yahoo.com/info/terms/