×

Sign up and get MultiCharts free

Use its powerful simulation mode with data included out of the box. Just fill out the form and start honing your trading skills with a few clicks.

Changes - MultiCharts
Open main menu

Changes

Created page with "The studies can access the list of symbols available in the database. Access to this service is performed via the '''SymbolStorage''' property returned by the '''ISymbolStorag..."
The studies can access the list of symbols available in the database. Access to this service is performed via the '''SymbolStorage''' property returned by the '''ISymbolStorage''' interface. This interface contains methods for requesting the symbols under different criteria.

<syntaxhighlight>
MTPA_MCSymbolInfo2[] GetSymbols(string data_feed);
</syntaxhighlight>

Returns an array of {{color|blue|MTPA_MCSymbolInfo2}} structures corresponding to all the instruments added into the database from a data source set as a parameter in the {{color|blue|data_feed}}.

<div style="background-color: #E5F6FF;">'''Example:'''
<syntaxhighlight>
MTPA_MCSymbolInfo2[] IQFeedSymbols = SymbolStorage.GetSymbols("IQFeed");
</syntaxhighlight>
Will return an array of all the symbols added from IQFeed that are available in database that can be found in the QuoteManager.
<syntaxhighlight>
MTPA_MCSymbolInfo2[] GetSymbols(string data_feed, string name);
</syntaxhighlight>
Will return an array of {{color|blue|MTPA_MCSymbolInfo2}} structures corresponding to all the instruments available in the database added from the {{color|blue|data_feed}} source and the symbol name = {{color|blue|name}}.
</div>

<div style="background-color: #E5F6FF;">'''Example:'''
<syntaxhighlight>
MTPA_MCSymbolInfo2[] IQFeedSymbolsMSFT=SymbolStorage.GetSymbols("IQFeed", "MSFT");
</syntaxhighlight>
Will return an array of all the symbols from the database with IQFeed as data source and the symbol name is MSFT.
<syntaxhighlight>
MTPA_MCSymbolInfo2[] GetSymbols(string data_feed, string name, ESymbolCategory cat);
</syntaxhighlight>
Will return an array of {{color|blue|MTPA_MCSymbolInfo2}} structures corresponding to all the instruments in the base added from the {{color|blue|data_feed}} source with the {{color|blue|cat}} category.
</div>

<div style="background-color: #E5F6FF;">'''Example:'''
<syntaxhighlight>
MTPA_MCSymbolInfo2[] IQFeedSymbolsMSFTStock = SymbolStorage.GetSymbols("IQFeed", "MSFT", ESymbolCategory.Stock);
</syntaxhighlight>
Will return an array of all the symbols in the database added from IQFeed with the name MSFT and the category is Stock.
<syntaxhighlight>
MTPA_MCSymbolInfo2[] GetSymbols(string data_feed, string name, ESymbolCategory _cat, string Exchange);
</syntaxhighlight>
Returns an array of {{color|blue|MTPA_MCSymbolInfo2}} structures corresponding to all the instruments in database added from the {{color|blue|data_feed}} source with {{color|blue|name}} symbol name, {{color|blue|cat}} category and {{color|blue|Exchange}} exchange.
</div>

<div style="background-color: #E5F6FF;">'''Example:'''
<syntaxhighlight>
MTPA_MCSymbolInfo2[] IQFeedSymbolsMSFTStockCME =
SymbolStorage.GetSymbols("IQFeed", "MSFT", ESymbolCategory.Stock, “CME”);
</syntaxhighlight>
Will return an array of all the instruments from the database added from IQFeed, with MSFT as the symbol name, Stock as the category and CME as the exchange.
</div>

This service can be used for obtaining all the attributes of the symbol based on its key parameters only.
[[Category:.NET Programming Giude]]