Creating watchlists from multiple or specific Market categories

Hello everyone, new AmiBroker user here and on a steep learning curve.

Firstly, let me say I've looked through a lot of existing questions on this forum and in the Knowledge base, Google etc and haven't come across my exact question so I apologise if it has been asked and answered previously.

What I'm trying to do is import a watchlist from a CSV file, for example the Russell 2000. Which is easy enough in theory. However I have both Australian ASX data and US share data categorised into 4 separate Markets. When I try to import the Russell 2000 CSV file, Amibroker includes ASX share tickers and information instead of the US share ticker and information, and it also leaves large gaps where a share ticker is included, but there is no corresponding data. images below


Is there a way I can somehow create US based watchlists from multiple, specific US Market categories while excluding ASX, so ASX shares with the same tickers don't get added to it?

I've tried everything I can think of other than deleting my ASX data from the database and starting again (which I hope not to have to do).

Thanks in advance

Welcome, @Natasha.

Usually, when your database contains tickers from different markets, it is a common practice to differentiate them using a suffix (for instance adding .AX to the Australian tickers). These suffixes are commonly used also by data providers except for the USA markets (but in some cases, you'll find them indicated with a .US suffix). This past thread addresses a similar topic.

In any case, you CANNOT have the same ticker for two different companies/markets in the same database. The data for each symbol is stored under its corresponding folder (see the section AmiBroker database structure), so updating one ticker from a market will overwrite any existing data previously updated from the other market.

One additional optional consideration that you should evaluate is the fact that mixing tickers from different markets also means that you have to handle multiple currencies. This will require you to correctly set the necessary historical fx rates, in case you'll mix them in a single portfolio (see the Mulitple Currency Support section in this document).

Personally, I use multiple databases, but for simplicity, I avoid mixing currencies. For instance, I have a single database for many European stock markets (different exchanges), all of them quoted in Euros, but I use a separate db for the Swiss equities that are quoted in CHF.

Hi Beppe, thanks very much for your reply and the warm welcome. My data is all in different databases, so ASX stocks are in a completely seperate database to US stocks. The issue arises after I import the data to Amibroker where it all gets mixed in the "Undefined" market category and even when I assign each database to it's own seperate market using the "assign categories" menu option, it seems to still be all mixed up and the ASX ticker overrides the US tickers when I try to make watchlists via importing a .csv file.

I have deleted all my ASX data from the AmiBroker database and am now creating watchlists with US data only to see if that works. What I would like to be able to do is create a watchlist from a specific market category only, so any stock ticker not in that market is ignored but it doesn't seem that Amibroker has this feature (that I can find).

If you really have two different DBs and if data in US DB is mixed with ASX data then you seem to have two instances of AmiBroker being open at same time and then you seem to import via Windows OLE from other process (such AmiQuote or JS scipt) and first instance having US DB loaded and second instance having ASX DB loaded. In that case (of OLE run from other process) the first instance of AB is used by OLE to import data to (apparently you loaded the US DB there in 1st AB instance and while trying to download and import ASX data to 2nd DB of 2nd AB instance via Amiquote it imports the data to that first US DB instance).

So please read suggestion by @Tomasz given here:

Or first load ASX DB via first AB instance then download/import data to it. Next load US DB in that first instance and download/import US data to it.

As for creating watchlists and importing symbols to WL please read here

Hello fxshrat,

I definately don't have Amibroker open twice (is that even possible???). I use a Metastock plug-in to transfer my 6 MASTER files over from my data supplier's databases in a different folder on my hard drive into the Amibroker database. So I guess all my stock data from ASX and US indices all gets mixed up in the one Amibroker database.

Nevertheless, I have deleted my ASX data and then created a Russell 2000 watchlist by importing a .csv file which mostly worked in that it imported 1977 stocks, so close enough I guess... Then I re-imported my ASX data and created a couple of ASX watchlists without any issue, so the end result is pretty much as good as I can expect I suppose.

If I need to do much more with watchlists I will change my data supplier to Norgate as they have all the watchlists built in to their feed.

Thanks again for the replies

Yep sounds like the way to go @Natasha, with Norgate Data you will have the ‘.au’ suffix applied to all your ASX Symbols.

Really, when I say so then yes, it is possible to have multiple instances of AB being open. I am not mentioning things for prank purposes. :tired_face:
You can open as many AB instances as your PC is able to handle. So to try yourself... double-click AmiBroker icon on desktop and wait till AB has started. Then double-click same icon once again and see the magic happening...
Note: However you should avoid keeping same DB loaded in multiple avoid DB changes getting overwritten then... e.g. when closing the modified DB before the very same DB not being modified.