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

RE: [amibroker] graham Kavanagh Support and resistance levels using RSI.



PureBytes Links

Trading Reference Links

OK, I see now which figures you want. I have corrected the code accordingly. It will give you what you want.

----------------------- Begin Code --------------------------------

_SECTION_BEGIN("support and resistant");

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

Filter=C>10 AND C<75 AND ResBase>=1 AND SupBase >=1;

Buy=Sell=Short=Cover=0;

AddColumn(C,"Close",1.2);

AddColumn(ValueWhen( ResBase==Base, HHV(H,HHVperiod)) ,"Resistance",1.2);

AddColumn(ValueWhen( supbase==Base, LLV(L,HHVperiod)) ,"Support",1.2);

 

_SECTION_END();

 

------------------------------ End Code --------------------------------------

 

Donald F Lindberg


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of Rasheed Momoh
Sent: Tuesday, November 06, 2007 3:14 PM
To: amibroker@xxxxxxxxxxxxxxx
Cc: dlindber@xxxxxxxxxxxxx
Subject: RE: [amibroker] graham Kavanagh Support and resistance levels using RSI.

 


I have sent an attachment to show u want the support & resistance figures r generating.
for example UAC-PROP on the chart is showing a range of 19-21. the formula you sent me is showing 42.81-37.73.
pls what do i do.

abdulrasheed


--- On Tue, 11/6/07, Don Lindberg <dlindber@xxxxxxxxxxnet> wrote:

From: Don Lindberg <dlindber@xxxxxxxxxxnet>
Subject: RE: [amibroker] graham Kavanagh Support and resistance levels using RSI.
To: amibroker@xxxxxxxxxps.com
Date: Tuesday, November 6, 2007, 2:19 PM

I have put in basic code to allow you to run as exploration. You can narrow your search by changing the criteria in the Filter Statement.

 

------------ --------- ------ Begin Code ------------ --------- ---

_SECTION_BEGIN("support and resistant");

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

Filter=C>10 AND C<75 AND ResBase>=1 AND SupBase >=1;

Buy=Sell=Short=Cover=0;

AddColumn(C,"Close",1.2);

AddColumn(ResBase,"Resistance",1.2);

AddColumn(SupBase,"Support",1.2);

 

_SECTION_END();

 

------------ --------- ---- End Code ------------ ---------

 

Donald F Lindberg


From: amibroker@xxxxxxxxx ps.com [mailto: amibroker@xxxxxxxxx ps.com ] On Behalf Of rashmo_70
Sent: Tuesday, November 06, 2007 1:16 PM
To: amibroker@xxxxxxxxx ps.com
Subject: [amibroker] graham Kavanagh Support and resistance levels using RSI.

 

Please is it possible to do a scan on the formula below to generate
support & resistance prices other than browsing each chart?.

thanks.
_SECTION_BEGIN( "support and resistant");
//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,"",colorBlac k,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) ;
_SECTION_END( );


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___