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

[amibroker] S & R indicator from AFL Library



PureBytes Links

Trading Reference Links

Hello

I found this S & R indicator on the Ami website. However, when I copy it 
into the Indicator builder and try to plot it, I get a window which 
contains only the price series represented as candlesticks, just like I 
have in my main window.

Can anyone tell me where the Red and Green S & R lines are, or how I go 
about displaying them?

Thanks a lot for any help, Nik

//Support and resistance levels using RSI.
//graham Kavanagh May 2003
//Load into Indicator Builder
//Sensitivity of the levels can be changed with the variables
//Can test different numbers live with the Param function ctrl-R with open pane

_______________________________________________________________________________________________________



RSIperiod    = 5;    // Param("RSI p",3,14,30,1);
Percent         = 5;    //    Param("ZIG %",8,9,15,1);
EMAperiod     = 5;    //Param("EMA p",4,5,10,1);
HHVperiod     = 5;    //Param("HHV p",3,5,10,1);
NumLine         = 1;    //Param("Num Lines",3,1,20,1);

Base = DEMA(RSI(RSIperiod),EMAperiod);

GraphXSpace=0.5;
Plot(C,"",colorBlack,styleCandle);

for( i = 1; i <= numline; i++ )
{
ResBase = LastValue(Peak(Base,Percent,i));
SupBase = LastValue(Trough(Base,Percent,i));
Plot(ValueWhen( ResBase==Base, HHV(H,HHVperiod) ), "Resist Level", 
colorRed, styleLine);
Plot(ValueWhen( supbase==Base, LLV(L,HHVperiod) ), "Support Level", 
colorGreen, styleLine);
}
Title = Name() + "; " + Date() + ": Support & Resistance Levels using 
RSI: " + /*EncodeColor(colorGreen)+ "Support Levels are Green; 
"+EncodeColor(colorRed)+ "Resistance Levels are Red: 
"+EncodeColor(colorBlack)+*/ "Num lines ="+WriteVal(numline,1) ; 



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/