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

Re: [amibroker] AB.RefreshAll()



PureBytes Links

Trading Reference Links

Not sure if this is the same as what you need but this is what i use:

	oAB = CreateObject("Broker.Application");
	oAB.RefreshAll();

best regards,
herman

Saturday, February 10, 2007, 10:17:19 PM, you wrote:

> Hi Guys,

> I'm using a script to update all symbol info(downloaded from the
> newsletter ). but nothing happened. 
> so I restart my amibroker program, still the same.
> only after I exit another brokor.exe thread in window's task list,
> then I get the updated result. ( I can see it's saving database right
> before it exits completely.)
> Is the script creating a new broker instance everytime I ran it? if
> so, it doesn't make sense to even call refreshAll()...what am I
> missing here? 

> Thank you.
> Eric

> //here's the code I downloaded ///////////////

> var filename = "industryData.txt";

> var fso, f, r;
> var ForReading = 1;
> var AmiBroker;
> var fields;
> var stock;
> /* Create AmiBroker app object */
> AmiBroker = new ActiveXObject( "Broker.Application" );

> /* ... and file system object */
> fso = new ActiveXObject( "Scripting.FileSystemObject" );
> /* open ASCII file */
> f = fso.OpenTextFile( filename, ForReading);
> /* read the file line by line */
> while ( !f.AtEndOfStream ){
>       r = f.ReadLine();
>       /* split the lines using comma as a separator */
>       fields = r.split(",");
>       /* add a ticker - this is safe operation, in case that */
>       /* ticker already exists, AmiBroker returns existing one */
>       stock = AmiBroker.Stocks.Add( fields[ 0 ] );
>       stock.FullName = fields[ 1 ];
>       stock.IndustryID = parseInt( fields[ 2 ] );
> }
> /* refresh ticker list and windows */
> AmiBroker.RefreshAll();

> // end //////////





> 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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/

> For other support material please check also:
> http://www.amibroker.com/support.html
>  
> Yahoo! Groups Links




Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.17.35/680 - Release Date: 2/10/2007 9:15 PM