{"id":1151,"date":"2011-09-21T23:38:34","date_gmt":"2011-09-21T23:38:34","guid":{"rendered":"http:\/\/datafutures.net\/ecsi\/?page_id=1151"},"modified":"2013-06-21T17:19:14","modified_gmt":"2013-06-21T17:19:14","slug":"connect-csi-stock-data-to-trading-blox","status":"publish","type":"page","link":"https:\/\/www.csidata.com\/?page_id=1151","title":{"rendered":"Connect CSI Stock Data to Trading Blox"},"content":{"rendered":"<p>This process will setup UA with the sample stock data files, and set the preferences and options correctly for Trading Blox. You can then add and delete markets as necessary.<\/p>\n<p>Use the Portfolio\/Download Portfolio menu item in UA. Download the \u201cTradingBloxStocks\u201d portfolio. This will setup all the sample markets in a UA portfolio called \u201cstocks\u201d.<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/ua-menu1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1152\" title=\"ua-menu\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/ua-menu1-300x113.png\" width=\"300\" height=\"113\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/ua-menu1-300x113.png 300w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/ua-menu1.png 549w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Making sure the \u201cStocks\u201d portfolio is selected, use the \u201cPortfolio\/Select All\u201d menu item to select all the markets so that they all turn blue.<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1153\" title=\"blox-stocks1\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks1-300x266.png\" width=\"300\" height=\"266\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks1-300x266.png 300w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks1.png 476w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Use the Portfolio\/Edit File Settings menu item to double check that the file settings are correct. These files and any new files you add must be ASCII file format.<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1154\" title=\"blox-stocks2\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks2-300x162.png\" width=\"300\" height=\"162\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks2-300x162.png 300w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks2.png 634w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Note that all the file settings need to be correct. They should be setup automatically by the stocks portfolio, but if they are not, then use the Portfolio Select All menu item, Portfolio Edit File Settings, ASCII Preferences button, Edit Portfolio Options, and then check the tabs as per the screen shots below. Rebuild all the files as necessary.<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1155\" title=\"blox-stocks3\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks3-300x275.png\" width=\"300\" height=\"275\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks3-300x275.png 300w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks3.png 372w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1156\" title=\"blox-stocks4\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks4-272x300.png\" width=\"272\" height=\"300\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks4-272x300.png 272w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks4.png 452w\" sizes=\"(max-width: 272px) 100vw, 272px\" \/><\/a><br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1157\" title=\"blox-stocks5\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks5-272x300.png\" width=\"272\" height=\"300\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks5-272x300.png 272w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks5.png 452w\" sizes=\"(max-width: 272px) 100vw, 272px\" \/><\/a><br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1158\" title=\"blox-stocks6\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks6-272x300.png\" width=\"272\" height=\"300\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks6-272x300.png 272w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks6.png 452w\" sizes=\"(max-width: 272px) 100vw, 272px\" \/><\/a><\/p>\n<p>Use the \u201cPortfolio\/Rewrite File Immediately\u201d to create these data files.<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1159\" title=\"blox-stocks7\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks7.png\" width=\"299\" height=\"179\" \/><\/a><\/p>\n<p>Note the directory (third column in the listing is the directory) in which these files are located \u2013 probably C:\\ua\\Files\\Stocks.<\/p>\n<p>In Trading Blox preferences, set the Stock Data Folder to C:\\UA\\Files\\Stocks. Start by pressing the Stock Data button to bring up a folder explorer window.<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1161\" title=\"blox-stocks8\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks8-287x300.png\" width=\"287\" height=\"300\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks8-287x300.png 287w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks8.png 692w\" sizes=\"(max-width: 287px) 100vw, 287px\" \/><\/a><\/p>\n<p>Browse to the Stocks folder using the drop down menu to the right of Look In. Be sure to go into (double click into) the Stocks folder, rather than just highlight it.<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1163\" title=\"blox-stocks9\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks9-300x219.png\" width=\"300\" height=\"219\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks9-300x219.png 300w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks9.png 561w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>So once selected, the screen should look like this. Now press Select.<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1164\" title=\"blox-stocks10\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks10-300x219.png\" width=\"300\" height=\"219\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks10-300x219.png 300w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks10.png 561w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>The preferences screen should now look like this, with the Stock Data folder set to C:\\ua\\Files\\Stocks\\<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks11.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1165\" title=\"blox-stocks11\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks11-287x300.png\" width=\"287\" height=\"300\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks11-287x300.png 287w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks11.png 692w\" sizes=\"(max-width: 287px) 100vw, 287px\" \/><\/a><\/p>\n<p>In Trading Blox Edit\/Portfolio, create a new portfolio and add all the stocks you want to test. Note that the symbol will be the description and the exchange will be unkown. This is because there is no Stock Dictionary yet. But the File Name and Folder Location should be correct. You can now run a test using this new portfolio.<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks12.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1166\" title=\"blox-stocks12\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks12-300x197.png\" width=\"300\" height=\"197\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks12-300x197.png 300w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks12.png 978w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>This is what the listing would look like if you create a Stock Dictionary:<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks13.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1167\" title=\"blox-stocks13\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks13-300x197.png\" width=\"300\" height=\"197\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks13-300x197.png 300w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks13.png 978w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<h5>To add new markets to this UA portfolio:<\/h5>\n<p>Select the \u201cStocks\u201d portfolio in UA<br \/>\nUse the \u201cPortfolio\/Insert File\u201d menu item to add a new market to the portfolio.<br \/>\nClick on the Markets button.<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks14.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1170\" title=\"blox-stocks14\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks14-300x162.png\" width=\"300\" height=\"162\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks14-300x162.png 300w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks14.png 634w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Check all the markets to include<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks15.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1171\" title=\"blox-stocks15\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks15-272x300.png\" width=\"272\" height=\"300\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks15-272x300.png 272w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks15.png 564w\" sizes=\"(max-width: 272px) 100vw, 272px\" \/><\/a><\/p>\n<p>Build the data files as necessary.<\/p>\n<p>Open Trading Blox and use the Portfolio Editor to add these new markets to a Trading Blox portfolio to use in testing.<\/p>\n<p>If you have problems, start by checking the data files in UA. Find the location of the data files (probably C:\\UA\\Files\\Stocks) and make sure the files are as expected. Symbol name with a .txt for all the markets you want.<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks16.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1182\" title=\"blox-stocks16\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks16-254x300.png\" width=\"254\" height=\"300\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks16-254x300.png 254w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks16.png 423w\" sizes=\"(max-width: 254px) 100vw, 254px\" \/><\/a><\/p>\n<p>Now open this file in Notepad to examine it. Make sure the start and end dates are as expected, and make sure the fields are comma delimited in the DOHLCVU format.<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks17.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1173\" title=\"blox-stocks17\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks17-300x209.png\" width=\"300\" height=\"209\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks17-300x209.png 300w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks17.png 680w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Now check that the Stock Data Folder in Trading Blox preferences is set correctly:<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks18.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1174\" title=\"blox-stocks18\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks18-287x300.png\" width=\"287\" height=\"300\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks18-287x300.png 287w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks18.png 692w\" sizes=\"(max-width: 287px) 100vw, 287px\" \/><\/a><\/p>\n<p>And check the Trading Blox Portfolio Editor to make sure the markets are in the portfolio as expected, and the file name and folder location are correct.<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks19.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1175\" title=\"blox-stocks19\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks19-300x208.png\" width=\"300\" height=\"208\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks19-300x208.png 300w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks19.png 889w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Now you can use this new Trading Blox portfolio called \u201cua stocks\u201d in your testing.<\/p>\n<p>Note that you have no stock dictionary yet, so the stock symbol is also the stock description, and the currency is assumed to be the system wide base currency of Trading Blox as set in preferences.<\/p>\n<p>To create the optional Stock Dictionary use the Build Stock Dictionary option in Trading Blox preferences. This will create a stock dictionary for the markets you have in your stock data folder. Note that if you add new markets to the stock data folder, they will not be available in Trading Blox until they have also been added to the Stock Dictionary, either manually or by running this process again. It\u2019s sometimes easier to not create the dictionary, so you can just add new markets to the data folder easily.<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks20.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1176\" title=\"blox-stocks20\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks20-287x300.png\" width=\"287\" height=\"300\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks20-287x300.png 287w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks20.png 692w\" sizes=\"(max-width: 287px) 100vw, 287px\" \/><\/a><\/p>\n<p>Here is how the Stock Dictionary will look in the Data\/Dictionaries folder. It is called StockInfo.csv.<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks21.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1177\" title=\"blox-stocks21\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks21-300x234.png\" width=\"300\" height=\"234\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks21-300x234.png 300w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks21.png 553w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>And here is what it looks like if opened in excel:<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks22.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1178\" title=\"blox-stocks22\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks22-300x132.png\" width=\"300\" height=\"132\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks22-300x132.png 300w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks22.png 1005w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>And as an advanced topic, if you work with delisted stocks, or have non unique symbol names from different exchanges, you should export your CSI files using the CSI Number as the file name rather than the symbol. First delete all the files in the UA\\Files\\Stocks folder, so this rebuild will be a clean fresh list of files. Then check this box, and rebuild all your files.<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks23.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1179\" title=\"blox-stocks23\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks23-272x300.png\" width=\"272\" height=\"300\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks23-272x300.png 272w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks23.png 452w\" sizes=\"(max-width: 272px) 100vw, 272px\" \/><\/a><\/p>\n<p>The Trading Blox Portfolio Editor will now look like this, with the csi number as the symbol.<br \/>\n<a href=\"\/wp-content\/uploads\/2011\/09\/blox-stocks24.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-1180\" title=\"blox-stocks24\" alt=\"\" src=\"\/wp-content\/uploads\/2011\/09\/blox-stocks24-300x208.png\" width=\"300\" height=\"208\" srcset=\"https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks24-300x208.png 300w, https:\/\/www.csidata.com\/wp-content\/uploads\/2011\/09\/blox-stocks24.png 889w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This process will setup UA with the sample stock data files, and set the preferences and options correctly for Trading Blox. You can then add and delete markets as necessary. Use the Portfolio\/Download Portfolio menu item in UA. Download the \u201cTradingBloxStocks\u201d portfolio. This will setup all the sample markets in a UA portfolio called \u201cstocks\u201d. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":1136,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/www.csidata.com\/index.php?rest_route=\/wp\/v2\/pages\/1151"}],"collection":[{"href":"https:\/\/www.csidata.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.csidata.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.csidata.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.csidata.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1151"}],"version-history":[{"count":9,"href":"https:\/\/www.csidata.com\/index.php?rest_route=\/wp\/v2\/pages\/1151\/revisions"}],"predecessor-version":[{"id":1162,"href":"https:\/\/www.csidata.com\/index.php?rest_route=\/wp\/v2\/pages\/1151\/revisions\/1162"}],"up":[{"embeddable":true,"href":"https:\/\/www.csidata.com\/index.php?rest_route=\/wp\/v2\/pages\/1136"}],"wp:attachment":[{"href":"https:\/\/www.csidata.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}