Hi
I never used loop but I think it's a way to import ALL THE FILES FROM A
DIRECTORY ( 50 Files ) ?
Something like *.txt
Can someone help me to do that ?
regards
**********************************
File2Import( "D:\\3 Documents\\QT\\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();
}