Programmatic Add Symbols to a Database

What’s the best way to add symbols to a Database, such as IQFeed via AFL/Batch? I don’t find such an action item in Batch UI. The use case is as follows:

I have a symbol list (in a text file) that is updated via Batch run off an EOD database with a large universe symbols (e.g. Norgate). I want to have these symbols present in the real time database for further filter in real-time. Right now, I have to manually type them in, if they aren’t already in the real-time database. Having the symbols in a Watchlist doesn’t add them to the Database automatically, it seems.

Thanks.

Symbol->Watch List->Import

  • adds symbols to watch list and to the database

Using OLE interface
http://www.amibroker.com/guide/objects.html
JScript:

AB = new ActiveXObject("Broker.Application");
stks = AB.Stocks;
stks.Add("symbol_to_add");

ASCII importer
http://www.amibroker.com/guide/d_ascii.html
Use if your symbol list is one symbol per line

SYM1
SYM2

then import definition is:

$FORMAT Symbol
$NOQUOTES 1
$AUTOADD 1

ASCII importer can be automated from OLE too and from Batch window.

2 Likes