Hello

I wish to incorporate 50 files in the AB database with a single click script.

Can someone help me to resolve these 3 problems ?

***************************************

1
How to open AB in a script ?

To quit it is ;

oAB.Quit();

***************************************

2
How to incorporate that function in a script 2 automatically open a DataBase ( 
and then import files ) ?

Function LoadDatabase(ByVal Path As String) As Boolean 

***************************************

3
How to import all the ASCI Data files from a DIRECTORY ( +- 50 Files ) ?

***************************************

Best regards

PS Below is a script for importing 1 ASCI Data file from a directory

**********************************
**********************************

File2Import( "D:\\Datas\\4356.txt" );
function File2Import( filename )

{
/* Create AmiBroker app object */
AmiBroker = new ActiveXObject( "Broker.Application" );

/* ... and file system object */
fso = new ActiveXObject( "Scripting.FileSystemObject" );

/* we use file name ( without extension ) as a ticker name */
ticker = fso.GetBaseName( filename ).toUpperCase();

/* add a ticker -, in case that ticker already exists, AmiBroker returns
existing one */
stock = AmiBroker.Stocks.Add( ticker );

/* import the data using appropriate format definition file */
AmiBroker.Import( 0, filename, "_IntraDay.format" );

AmiBroker.RefreshAll();
}


Reply via email to