How to import WatchListID with JavaScript?

Today,
I found my old Javascript
to import fundamental data into AmiBroker,
in short, I just list the code about what I want to ask:

          // import symbol information into a specified Ticker 
          stock.MarketID      = parseFloat( fields[ 1 ] ); 
          stock.FullName      = parseFloat( fields[ 2 ] ); 

On Users Guide about OLE,
I cannot see property named 'WatchListID',
and there are properties
named 'WatchListBits', 'WatchListBits2'.
Q1) Does any one know what does it mean???

My question is the correct syntax
to assign the Watchlist ID (0 to 31)
to the fundamental data of symbols with JavaScript.
Q2) Does any one know the correct syntax for this?

Thank you very much :smiley: !

@alexlin, please, read this previous thread about StockInfo and WatchlistBits.

Since watchlists are just plain text files, you can probably find an alternative way to manipulate (create/delete/modifiy) them outside of AmiBroker using your scripts.

1 Like

@beppe, thank you, for your nice reply :smiley:!

I've already read your link before I post this article,
your link tell me about
"re-load watch lists without re-opening database".
and Dr. Tomasz says
"WatchListBits field functionality was removed quite some time ago",
but I don't know where to find the plain text files (watch lists files), could you please tell me?

You can find the watchlist files in:
Amibroker folder > DatabaseName folder > WatchLists folder

watchlist file extension is .tls, can be edited with notepad.

1 Like

@bursaware, @beppe,
I know why I did not see watchlist files,
because I did not close AmiBroker
after I add some new watchlist to it.
//
It is a good design to store watchlist with plain text,
so I can use exteranl program to read and modify it easily,
Thank you all :sunglasses:!