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

[amibroker] Re: Laguerre RSI Indicator



PureBytes Links

Trading Reference Links

Also, check out messages #11896, 12560 & 28399.
dale b
--- In amibroker@xxxxxxxxxxxxxxx, "rck1135" <rkrebs@xxxx> wrote:
> Thanks to Ara, Graham and Jayson for your responses to my post re 
the 
> Laguerre RSI indicator.  Obviously, the MS code is vastly different 
> than the AFL language, but the result is plotted by the 'IF' 
> statement in the last line; If temp is equal to -1 then display 
a '0' 
> otherwise display the value of 'cu divided by temp'.  The trick in 
> this formula is to duplicate the MS 'Prev' function and I 
appreciate 
> the references to past posts on this subject.  The 'Prev' constant 
> allows one to create self-referencing formulas - one that is able 
to 
> reference the previous period's value of itself.  Example:
> ((H+L+C)/3)+PREV
> the formula divides the High, Low and Close price by 3 and then 
adds 
> this value to Yesterday's value of the ((H+L+C)/3).  
> One wouls assume that the PREV function could be readily replace by 
> the AB Ref() function, but it is not that easy.  At any rate I will 
> continue to attemp[t a conversion of this indicator as it is pretty 
> good.
> 
> Thanks again,
> Ron
> 
> 
> 
> 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)


------------------------ 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/