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

Re: [amibroker] WatchListBits



PureBytes Links

Trading Reference Links

Dear Keith,

WatchListBits member of the stock object
is a bit field.
It means that you should perform logical OR
on it's value;

stock.WatchListBits = stock.WatchListBits | ( 1 << listnumber );

or

stock.WatchListBits |= ( 1 << listnumber );

| is a logical OR operator.
<< is a bit shift operation;

1 << 1 gives you 2
1 << 2 gives you 4
1 << 3 gives you 8
1 << 4 gives you 16
and so on... (32, 64, .)
....

Best regards,
Tomasz Janeczko
amibroker
----- Original Message -----
From: <kbennett@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, November 08, 2001 2:34 AM
Subject: [amibroker] WatchListBits


>
> Can anyone help with this problem?
> I am trying to populate a watch list with tickers using JScript, and
> I'm not sure if the problem is with the script or with the data file.
>
> In the JScript I have the lines:
>
> stock = AmiBroker.Stocks.Add( fields[ 0 ] );
> stock.FullName = fields[ 1 ];
> Stock.WatchListBits = 0; (To populate List 0)
>
> One line of the data file reads:
>
> XYZ,XYZ Corporation,0
>
> Should I be using the List# or list name in the datafile? Do I need a
> field# in the script file?
>
> Keith B
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>