How to setup database – Amibroker

     To any software, we are require to have a database. A database means, a folder where historical prices of stocks are stored in a particular format. That data then used by the software to plot candlesticks for technical analysis. User do not have to worry about the format as software would do that itself. There are two types of data, tick by tick and End of the Day (EoD). We here are looking into setting up EoD data.

      Once we have the charting software, what we need to do is to import historical prices. Once we are done with that, we are basically all set to go with only thing remaining is updating database everyday – or as often as you scan stocks.

Step 1. Download ‘Data Downloader’ software here:

http://www.marketcalls.in/database/download-mcx-eod-data-using-data-downloader.html

     I have used a lot of software for EoD data and finally settled for this one. The reason being, this software pulls data from NSE website directly unlike many others who do it from yahoo finance. NSE publishes EoD at about 4.30PM everyday. After that we can use this software to download the data (or you can do it yourself directly from NSE website). Yahoo finance data is simply undependable. Here is the link to NSE website to download data: http://www.nseindia.com/products/content/all_daily_reports.htm

2.Install the software and set download path:

       Create a folder where you will store all the downloaded files and do not move it. We can create it in Program Files > Amibroker. It would be easier that way as we do not generally move around folders in an installed directory.

Then select that folder as NSE EoD data path. Go to Settings > Select data Path

data downloader path

Now we are all set to download the data. Configuration of the software is also very neatly written on the page where you download the software from.

3. Download Historical Data:

Go to the Download > Eod Data > NSE EOD

select dates

    Select duration for which you would like to download the data. Just for fun, you can download it for past 8-12 years. Downloading historical data is a one time deal. Once you have set dates, click on download. In the example above I have selected dates from year 2000. All the files would be text files (.txt) also called ASCII files.

4. Create new database in Amibroker:

      First, create a NEW folder for Amibroker database. The folder you download data to and Amibroker database are two different folders. Lets say, the new folder is named NSE EoD. We can create the folder in the same directory Program Files > Amibroker.

Then go to File >> New >> Database

New database

 ‘browse‘ to NSE EoD.

browse

Then click ‘Create.’ After clicking the create button, all the options below will now get enabled. What basically Amibroker has done in the previous step is to create a few new format files and folders needed for the database automatically. Now select all the options, as shown in image below. You can change the number of bars if you want:

database settings

 Just a few steps away now….

5. Import:

Go to File > Import Wizard

import wizard

Click on ‘Pick Files’. Select ALL the downloaded text files in the NSE E0D folder. Then Click Next. Now you would be at the screen below:

define fields

Make the following changes: 1. Verify date format in the ‘data file sample’. In our example we can see format is DMY. (date-month-year). Change ‘column 2’ accordingly. 2. Change Skip first to ‘3 lines’. Because first three lines are not for any stock, it is just the general information. Keep everything else as it is. Click Next.

additional settings

Verify with the above image and then click ‘Finish’. That’s it!! Now you have a database to play with. Next time you import data for one day or even for few days, go to

File > Import ASCII…

We do not have to go through import wizard.

CRGS.