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

Re: [amibroker] Generate a List (File)



PureBytes Links

Trading Reference Links

Awhile back someone was very generous when they posted something like what is below.  It might be a little more than you understand at the moment but study,undrstand, and build upon it.  Frankly, I dont think I could come up with this on my own but someone was kind enough to share.  Pay it forward, when you can!!  I dont know if this what you want?  ....   but it works

 

Good Luck

 

Jim Wiehe

 

 

 

w = Param("Empty Watchlist First? Yes = 1, No = 2" , 1, 1, 2, 1);

w1 = Param("Autofill Watchlist? Yes = 1, No = 2" , 1, 1, 2, 1);

x = Param ( "Add Results to an Existing Watchlist? Yes = 1, No = 2" , 1 , 1 , 2 , 1 ) ; // select whether to add results to watchlist or not

y = Param("Set Watchlist Number", 51, 2, 60,1); // sets the watchlist number, but reserves the first 2 AND last 4 watchlists

Clear = IIf(w ==1, 1, 0);

if( LastValue(Clear) )

{CategoryRemoveSymbol("", categoryWatchlist, y); }

 

 

 

 

Cond1= RSI(15) >50; // the RSI is greater than 50

////////////////////////////////////////////////////////////////

 

Filter = Cond1 AND SectorID() == 2 OR SectorID() == 3;//whatever stocks you are filtering/scanning

Buy=Filter;

AddColumn( Close, "Close ",1.2 );

AddColumn(RSI(15),"RSI");

AddTextColumn ( SectorID(1) , "Sector ");

 

///////////////////////////////////////////////////////////////////////////////////////////////

 

autoFILL = IIf( w1==1, Filter,0 ) ;

Add = IIf( x==1, Filter , 0 ) ;

if( LastValue( Add OR autoFill ) )

{ CategoryAddSymbol( "", categoryWatchlist, y ); }// this set from above or parameters within AA menu

 



----- Original Message ----
From: abdulrahim abdulrahim <abdul.rahman.rahim@xxxxxxxxx>
To: amibroker@xxxxxxxxxxxxxxx
Sent: Sunday, March 30, 2008 6:43:15 AM
Subject: Re: [amibroker] Generate a List (File)

Thank you for your prompt reply Jim.

When I try to run your code, I have this error message:
Ln: 1, Clo: 9: Error 31. Syntax error, expecting '('

Then I modify your code as the following:
if( RSI(15) > 50 )
{
CategoryAddSymbol( "", categoryWatchlist, yourWLnumber );
}

But now, the following mesage pops up:
Ln: 1, Col : 15 : Error 6. Condition in IF statement bla bla has now
has no to be Numeric or Boolean type. Bla bla...

Can you guide me more to address this porblem?

Thanks

On Sun, Mar 30, 2008 at 10:51 AM, JIM WIEHE <jim_wiehe@xxxxxx com> wrote:
>
> if( RSI > 50 )
> {
> CategoryAddSymbol( "", categoryWatchlist, yourWLnumber );
> }




Never miss a thing. Make Yahoo your homepage. __._,_.___

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

__,_._,___