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

[amibroker] Re: Clen up current symbol data



PureBytes Links

Trading Reference Links


code extract to open database


 /* Create AmiBroker app object */
 AmiBroker = new ActiveXObject( "Broker.Application" );
 /* load the right database*/
 if (AmiBroker.LoadDatabase(filepath)  ){
    WScript.Echo( "successfully loaded new database " + filepath)  ;
 }else{
    WScript.Echo( "Problem in loading database" ) ;
    return (-1)  ;

 }

--- In amibroker@xxxxxxxxxxxxxxx, "cash" <ko.tseng@xxxx> wrote:
> 
> 
> Dear All,
> 
>   I tried a short script to clean up data of current symbol. 
However 
> everytime only half-1 records are deleted. Please help.
> 
> var oAB = WScript.CreateObject("Broker.Application");
> var oAS = oAB.Stocks(oAB.ActiveDocument.Name);
> var RecordCount = oAS.Quotations.Count;
> 
> WScript.Echo(RecordCount);
> 
> for (i=0; i<RecordCount; i++) {
> 	WScript.Echo(oAS.Quotations.Remove(i));
> }
> 
> In addition, is there any function to switch from one database to 
> another. Thanks a lot.
> 
> Ko





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/