PureBytes Links
Trading Reference Links
|
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 amibroker@xxxxxxxxxxxxxxx, "cstrader232" <cstrader232@xxx>
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!
>
|