PureBytes Links
Trading Reference Links
|
I am using this script below to assign a list of tickers
to watchlist, but I get an error saying "file not found"
The script and the named file are both in the same directory
and AB is up an running. THe "beat.txt" is acii
Please help or tell me another way I can put a list into
a watchlist.
thanks in advance
nand
//======================================================
var filename;
var fso, f, r;
var ForReading = 1;
var AmiBroker;
var fields;
var stocks;
AmiBroker= new ActiveXObject("Broker.Application");
fso= new ActiveXObject("Scripting.FileSystemObject");
filename="beat.txt";
f = fso.OpenTextFile(filename, ForReading);
while(!f.AtEndOfStream)
{
r=f.ReadLine();
fields=r.split(";");
stock=AmiBroker.Stocks.Add(fields[0]);
stock.WatchListBits = stock.WatchListBits | ( 1 << 0 );
}
AmiBroker.RefreshAll();
//end =============
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Make Money Online Auctions! Make $500.00 or We Will Give You Thirty Dollars for Trying!
http://us.click.yahoo.com/KXUxcA/fNtFAA/uetFAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|