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

[amibroker] Ehlers Smoothed RSI



PureBytes Links

Trading Reference Links

Does anyone have the code for Ehlers Smoothed RSI.

Below is the EasyLanguage Code provided by MESA.  If anyone would be 
kind enough to convert into AFL I would be much appreciative.  Had a 
go myself and gained error messages I found unable to correct.

Regards,
Keith.


Inputs:	Len(10);
Vars:	count(0),	
        Smooth23(0),	
        CU23(0),	
        CD23(0),	
        SRSI(0);

Smooth23 = (Close + 2*Close[1] + 2*Close[2] + Close[3])/6;
CU23 = 0;
CD23 = 0;

For count = 0 to Len - 1 begin	
       If Smooth23[count] > Smooth23[count + 1] then CU23 = CU23 +  
Smooth23[count] - Smooth23[count + 1];     	
       If Smooth23[count] < Smooth23[count + 1] then CD23 = CD23 +    
Smooth23[count + 1] - Smooth23[count];
end;

If CU23 + CD23 <> 0 then SRSI = CU23/(CU23 + CD23);

Plot1(SRSI, "SRSI");


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/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/