Automated way to import many symbols into Amibroker

I have a python script that downloads 4000+ OHLCV data files from various sources and stores them in .csv format.

Is there an automated way to import all of these into Amibroker? - for example a python script that can add them as a new symbol

I tend to use Amibroker on linux in the cloud, so OLE automation doesnt work on WINE.

Hello traderuk99,

"Batch Window" and sequence "Import quotation data from ASCII files" could solve your requirement.

Additional look at this post:

Best regards,

Thank you Pietro, that is very useful. I didnt know of batch analysis.

In batch analysis, I use "Data Import ASCII" , but in "Parameter" I am required to select the .csv files. I have 4000 files and these change each time.

Is there a way to just import a folder with all the files in?

In my mind you cannot import the content of an folder. So you wrote before you have some python scripts to get your data via internet download. Think about to consolidate your output in one/single csv, use for example "open append" after change querying your sources or conkartinate your ~4000 files via another python script. Then import your "one result file.csv". Don't forget to define the necessary AB format file.

Hey appreciate your help, but I'll look for a different solution - this is too unwieldy to be used practically, especially as I do this every day.

@traderuk99, if the "batch" way is ok for you, you can use your Python skills to write a (long) "custom" batch file (.abb).

These files are simply XML files so it should be not very difficult.

Simply create one new batch file via the Amibroker UI to import one or two symbols and then examine the generated file with an editor like Notepad++.

Then write a Python script that will scan your folder for symbols and generate/write the "batch" file including all the required import steps/tags for all your files.

1 Like

OK, that looks like an option. Thank you :slight_smile:

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.