Duplicating Symbols in amibroker


Is there a way how I can duplicate an existing symbol and store the duplicated symbol under a different name in the same database ? For Eg. I want to duplicate “NIFTY” and store it as “NIFTYONE” so that every time " NIFTY " gets updated in real time , "NIFTYONE " also gets updated.


Creating duplicates is bad idea. You should use ALIAS field instead. That way the same symbol can be called by name and alias.

@Tomasz is there a size limit to the ALIAS field? (I wonder if it could be used to store complex data in some structured format)

How do I create an ALIAS field?

You do not! All symbols already have a field Alias, you just need to fill it, by importing or typing in symbol information window

The "Symbol Information" window is one of the many that can be toggled on/off from the main menu "Window" item:


Alias as any other field should be used ONLY for its intended purpose (in this case the ALIAS) not for storing anything else. For storing “complex data” you have FILES

Abusing any field for storing something else than designed may and will lead to unpredictable results including crashes all kind of troubles.
You just don’t do that as you don’t fill your bath tube with sulphuric acid.

@Tomasz, thanks for the answer.

If I will use a separate file for each ticker (filename exactly as the ticker + my own file extension) and I will do it in the same subfolders (the ones named 0, 1, 2, 3, …x, y, z) where AB stores the ticker data (so there for each ticker there will be 2 files: one handled by AB and an additional one handled by my own functions), will this impact or not the performance of AB loading/saving the data and/or is something to completely avoid?

Don’t place your files in the very same folders as AmiBroker’s data files. Instead place them in your subfolder. Create a SUBFOLDER of database directory called say “MyData” and place your data there. This way you won’t create any troubles and performance will be unaffected.
Windows file system gets slow if there are more than 1000…2000 files in single subfolder. That is why AmiBroker uses letter subfolders, but you can create similar structure in your subfolder.


Can One symbol have multiple ALIAS fields?

No, one symbol and one alias only.

I know this may sound a bit quirky, but given the symbols system on Indian exchanges, am faced with the following issue especially for the indices with a futures trail:

  1. The index that is sent out in the cash segment ASCII comes with a ticker : "Nifty Fin Service"
  2. The same is sent out with a different ticker in index segment ASCII comes with a ticker : "NIFTY FINANCIAL SERVICES"
    So 2 above acts as an alias for 1. So far so good
  3. The same index when it goes to futures segment is refered as "FINNIFTY". Since all the futures contract take in tickers like FINNIFTY-I, FINNIFTY-II, FINNIFTY-III and many codes are coded that way, will require to be updated as FINNIFTY
    Currently I am using 1 above as an alias to 3.

What can be the work around? Like dual aliases?

Well, I keep the Cash tickers and Futures tickers separately. You can use the prefix "-I" for futures symbols


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