List of one or more symbols to include when importing data
An Import Section can have any number of IncludeList statements.
Each IncludeList statement can take one of the following forms:
•One or more symbols, separated by commas (up to a maximum of 260 characters in total)
•A path to a TXT file containing a list of symbols (one symbol per line with no commas)
•A path to a CSV file in which a column of symbols has a name that contains "symbol" or "ticker" or "underlying"
•The name of a Norgate watchlist, preceded by a dot (Norgate only)
The symbols from all of the specified include lists are combined into a single internal list.
If there are duplicates, only one copy of each symbol will be imported.
A special syntax, SYMBOL>ALIAS, can optionally be used to rename a symbol after it is imported (e.g. AAPL>APPLE). This is meant to be used when you actually want to import the same symbol from two different sources, so that each can be uniquely identified.
The number of the list in which a symbol first appears (whether literally or via an external file) is stored with the symbol and becomes the value return by ListNum when that symbol is the current context.
Though a symbol is only imported once, it can be listed in more than one IncludeList. The InList(n) function can be used to check whether the current symbol was among the symbols in the nth IncludeList.
An IncludeList can optionally be given a name. This is done by adding a squiggly-brace comment containing the name in quotes after the list definition, like this:
When a data file was imported using named include lists, a list name can optionally be used in place of the list number in the InList function, like this:
This can be a useful technique when combining multiple strategies in one script and therefore one Import definition.