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

[amibroker] Fwd: Javascript help plz



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, "nkis22" <nkishor@xxxx> wrote:

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 =============
--- End forwarded message ---



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online - Over 14,500 titles.
No Late Fees & Free Shipping.
Try Netflix for FREE!
http://us.click.yahoo.com/YoVfrB/XP.FAA/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/