I'm posting this in this section because the current rules don't allow posting anything else than NinjaScript indicators in the file sharing section.
You can download the tools (including the source for those who do not trust me) from my webspace at:
The first tool allows to extract stock symbols from an index. The usage is:
StockSymbolsFromIndex <Output file> <Index symbol> <Components> <Server> e.g.: StockSymbolsFromIndex "Dow Jones Composite Average" DJA 65 download.finance.yahoo.com
The output files contains a list of the symbols in the index in this format:
AA;AEP;AES;ALEX;AMR;AXP;BA;BAC;BNI;C;CAL;CAT;CHRW;CNP;CNW;CSX;CVX;D;DD;DIS;DUK;ED;EIX;EXC;EXPD;FDX;FE;FPL;GE;GM;GMT;HD;HPQ;IBM;INTC;JBHT;JBLU;JNJ;JPM;KFT;KO;LSTR;LUV;MCD;MMM;MRK;MSFT;NI;NSC;OSG;PCG;PEG;PFE;PG;R;SO;T;UNP;UPS;UTX;VZ;WMB;WMT;XOM;YRCW;
Note that in the output file there is a new line after every 200 symbols. This is because of a bug in the Market Analyzer (see http://www.ninjatrader-support.com/v...ead.php?t=9630) which cannot load data for more than 200 items at once (with the Yahoo account). By having the data grouped in groups of 200 symbols, you can create instrument lists that do not exceed the supported size (you still have to manually create separate lists of up to 200 symbols each but the grouping in the output file helps you to do so).
The second parameter is the (Yahoo) ticker symbol of the index whose components you wish to extract. Note that the tool requires the symbol not to start with "^" (this will be automatically added). You can also combine the symbols of multiple indices into one output file (duplicates are automatically discarded) by combining mutliple index symbols with a "+":
StockSymbolsFromIndex "US Stocks" DJA+NDX+GSPC 665 download.finance.yahoo.com
You can find the ticker symbols of the indices on the Yahoo Finance websites (http://finance.yahoo.com/, http://de.finance.yahoo.com/, etc.).
The third parameter is the number of stocks in the index.
The fourth parameter is the server from which to download the data. Normally this will be "download.finance.yahoo.com". However, some data is only available from some localized versions of the Yahoo Finance website. In this case the respective server must be specified, for example:
StockSymbolsFromIndex "DAX 30" GDAXI 30 de.old.finance.yahoo.com
UpdateStockNames <Database file> e.g.: UpdateStockNames "C:\Users\YourName\Documents\NinjaTrader 6.5\db\NinjaTrader.mdb"
Note: This tool messes with the NinjaTrader database so use it at you own risk! I'm not taking responsibility for any damage caused by this tool.
This tool will only update the description of instruments whose description is empty. Instruments with an existing description will not be modified.
Comment