yasu222,
Step 1 - Create file SKTODAY.format and copy it in format folder of Amibroker.Use following format
# Format definition file generated automatically
# by AmiBroker's ASCII Import Wizard
$FORMAT Date_YMD, Time, Skip, Volume, Open, High, Low, Close, Skip, Skip, Skip, Skip
$SKIPLINES 0
$SEPARATOR ,
$CONT 1
$GROUP 255
$AUTOADD 1
$DEBUG 1
Step 2
- U can directly import csv directly (no need to manipulate columns,date etc )
- Double click scrip e.g sbin and open chart
- Right click and save to default folder "C:\Sharekhan\TradeTigerNew\Chart\SBIN.CSV"
In notepad copy paste following code and save it as .js file.From command prompt run the above created file..It will import csv.
/*
** AmiBroker/Win32 scripting
**
** File: ImportQuotes.js
** Created:
** Purpose: Import quotes from a text file into a AmiBroker DataBase
** Language: JScript
*/
/* Create AmiBroker object */
AB = new ActiveXObject("Broker.Application");
AB.Visible = true;
var i=0;
AB.Import( 0, "C:\\Sharekhan\\TradeTigerNew\\Chart\\SBIN.CSV", "SKTODAY.format" );
AB.Import( 0, "C:\\Sharekhan\\TradeTigerNew\\Chart\\WIPRO.CSV", "SKTODAY.format" );
AB.Import( 0, "C:\\Sharekhan\\TradeTigerNew\\Chart\\TCS.CSV", "SKTODAY.format" );
AB.RefreshAll();
AB.SaveDataBase();
WScript.Echo("Importing from Sharekhan to TDB finished" );