Hello,

WatchListBits and WatchListBits2 is a bit array so you should use 

(in JScript):

WListNumber = 15;

if( WListNumber < 32 )
  st.WatchListBits = st.WatchListBits | ( 1 << WListNumber);
else
  st.WatchListBits2 = st.WatchListBits2 | ( 1 << (WListNumber-32));


BUT....
in AFL there is a lot more comfortable way using CategoryAddSymbol:
www.amibroker.com/f?categoryaddsymbol


CategoryAddSymbol( "", categoryWatchlist, WListNumber ); 

Regards,
Tomasz Janeczko
amibroker.com

--- In [email protected], "cstrader232" <[EMAIL PROTECTED]> 
wrote:
>
> I could use some help with watchlist bits: 
> 
> I get the syntax for adding a stock, and deleting it:
> 
> AB = CreateObject("Broker.Application");
> 
> st = AB.Stocks;
> 
> st.Remove("QQQQ"); 
> 
> st.Add("QQQQ");
> 
> 
> 
> But how do I add the stock to a watchlist?  
> 
> ???
> 
> st.WatchListBits | ( 1 << 1);
> 
> 
> tia!
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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 other support material please check also:
http://www.amibroker.com/support.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:
    [EMAIL PROTECTED]

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


Reply via email to