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

Re: [amibroker] HELP!!! PROBLEM WITH RSI DIVERGENCE



PureBytes Links

Trading Reference Links



this works no changes done just deleted your   /**/


From: rashmo_70 <rashmo_70@xxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Thursday, August 27, 2009 5:29:17 PM
Subject: [amibroker] HELP!!! PROBLEM WITH RSI DIVERGENCE

 

Hi Guys, I used to run a SCAN/EXPLORATION on this code, since I Upgraded to 5.28 BETA, I keep getting the following ERRORS....
Ln: 57, Col:4:Error 10. Subscript out of range. You must not access array elements outside 0.. (Barcount-1) range.
same with Ln 58,col 8 & Ln,59, Col 7

_SECTION_BEGIN( "RSI Divergence") ;
//---------- --------- --------- --------- --------- --------- ---
//
// Formula Name: RSI Divergence
// Author/Uploader: ali alsehri
// E-mail:
// Date/Time Added: 2008-04-02 23:50:02
// Origin:
// Keywords:
// Level: medium
// Flags: indicator
// Formula URL:
// Details URL:
//
//---------- --------- --------- --------- --------- --------- ---
//
// + scanner
//
//---------- --------- --------- --------- --------- --------- ---

/*---------- --------- --------- --------- --------- -----
RSI Divergence
Aron Pipa, april, 02 , 2008
------------ --------- --------- --------- --------- --------* /

GraphXSpace= 7;
n=Param("% Reverse ",20,0,100,1) ;

Buy=Sell=0;
Var = Zig(RSI(), n);
t= Trough(RSI() , n, 1);
p= Peak(RSI(), n, 1);
x[0] =Var[0];
price[0] = C[0];
j=0;

// bearish divergence
for ( i=0; i<BarCount; i++)
{
if(Var[i] == p[i])
{

j++;
x[j] =Var[i];
price[j] =C[i];
if(x[j] <x[j-1] && price[j-1]< price[j])
Sell[i] =1;
}
}

// bullish divergence
for ( i=0; i<BarCount; i++)
{
if(Var[i] == t[i])
{
j++;
x[j] =Var[i];
price[j] =C[i];
if(x[j] >x[j-1] && price[j]<price[ j-1])
Buy[i] =1;
}
}

Plot(Var, "", 39);
PlotShapes ( IIf(Sell, shapeSmallCircle, shapeNone), colorRed, 0 , Var,0);
PlotShapes( IIf(Buy, shapeSmallCircle, shapeNone), colorBrightGreen, 0, Var,0);

Filter = Buy OR Sell ;

Title ="RSI Divergence" ;
_SECTION_END( );

_SECTION_BEGIN( "TEMA");
P = ParamField(" Price field",-1);
Periods = Param("Periods" , 15, 2, 200, 1, 10 );
Plot( TEMA( P, Periods ), _DEFAULT_NAME( ), ParamColor( "Color", colorCycle ), ParamStyle(" Style") );

//////////// ///////// ///////// ///////// ///////// //
AddColumn( IIf(Buy,1,IIf( Sell,-1,Null) ), "rsiD", 1.0,colorWhite, IIf(Buy,colorGre en,IIf(Sell, colorRed, Null)));
//AddColumn( Sell, "Sell", 1.2 );
AddColumn(Close, "Close",1. 2);
AddColumn(Volume, "Volume", 1.0);
AddColumn(V/ EMA(V,20) ,"Vspurt" ,1.0);
AddColumn( RSI(), "RSI", 1.2 );
AddColumn( ROC( Close, 15 ), "ROC(15)", 1.2 );

AddColumn( Ultimate(), "Ultimate", 1.4 );

_SECTION_END( );


start: 0000-00-00 end: 0000-00-00

__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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





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

__,_._,___