Louis, I have posted an example file on ASCII import.
I didn't use the US-stocks XLS file because it is too big to load up to the UKB. I used an S&P Global1200 list instead. It is quite easy to do so once you understand the basic steps you can readily adapt it do what you want to do. brian_z --- In [email protected], "brian_z111" <[EMAIL PROTECTED]> wrote: > > Louis, > > There were two 'possible' methods in my posts but you have mixed them > up. It is not a problem. Just concentrate on the ASCII method since > Jims XLS file lends itself to that. > > I was planning to write up a method for ASCII import since it follows > on from where the current UKB posts end. > > It will be out in few days and then you can adopt the method for your > US-Stocks file. > > It is based on http://www.amibroker.com/guide/d_ascii.html > > Use MarketID etc. > > brian_z > > --- In [email protected], "Louis Préfontaine" > <rockprog80@> wrote: > > > > Hi Brian, > > > > Thanks for the step-by-step procedure. I did exactly as you > recommanded. > > > > I copied the two broker files from the us_stocks folder to a test > folder I > > created. > > > > Then I modified the structure of the xls file: I kept only 4 > columns with > > Market, Sector, Industry and Stock Symbol. > > > > I saved the file as a "format" file in the "formats" folder. > > > > I used the ASCII Wizard to import the file back, but this is where > it does > > not work. The problem is that in there I can't set the markets, > sector, > > industry, etc. I have to allocate a value which > is "Ticker", "YMD", "MDY", > > etc. so I don't know how to do it all at once to put everything > at the > > right place. I don't see any "sector" or "industry" variable that > could be > > assigned to a column in the ASCII file. > > > > Do you have any idea about what I could have done wrong? > > > > Thanks, > > > > Louis > > > > 2008/3/23, brian_z111 <brian_z111@>: > > > > > > Another faster way? > > > > > > The UKB DatabaseManagement posts are only a means to an end (they > > > package the basic skills of DM to allow people to go onto more > custom > > > applications as per the example below). > > > > > > I looked at Jim's XL file for the first time. > > > It contains all, or most of the info you need, to use an ASCII > import > > > method. > > > > > > Try this (I haven't but it should work - try a small example on a > > > dummy database first): > > > > > > a) setup broker.industry and broker.sector files to match Jim's > > > structure > > > b) setup a new database with no symbols or structure > > > c) modifiy Jims XLS file to have columns with Market, Group, > > > Industry, Watchlist ID numbers > > > d) also strip the .OB from the file names in XL. > > > e) create an ASCII format file to suit the above and save it to > the > > > formats folder > > > f) import the modified data, including tickers, using the format > file. > > > > > > For those interested Jims files are at: > > > > > > http://www.icc-az.com > > > > > > then go to Links >> AmiBroker > > > > > > > > > brian_z > > > > > > --- In [email protected] <amibroker%40yahoogroups.com>, > > > "brian_z111" <brian_z111@> wrote: > > > > > > > > A possible shortcut? > > > > > > > > a) Create a spare US-Stocks database. > > > > b) Rename all .OB stocks to remove the .OB > > > > c) 'Copy' the structure from US-Stocks (spare) to your local DTN > > > > database. > > > > > > > > I am not sure if you can 'target' .OB stocks and rename them. > > > > > > > > From a message by Tomasz: > > > > > > > > http://finance.groups.yahoo.com/group/amibroker/message/109280 > > > > > > > > The only way to actually RENAME symbols is to use OLE > automation: > > > > > > > > AB = CreateObject("Broker.Application"); > > > > stk = AB.Stocks( Name() ); > > > > > > > > stk.Ticker = "~" + Name(); > > > > > > > > If you can manage to rename the symbols then you can try to > > > replicate > > > > the structure by the methods discussed in this topic: > > > > > > > > > > > > http://finance.groups.yahoo.com/group/amibroker/message/121148 > > > > > > > > > > > > brian_z > > > > > > > > > > > > > > > > --- In [email protected] <amibroker% 40yahoogroups.com>, > > > "brian_z111" <brian_z111@> wrote: > > > > > > > > > > I still have more to learn about AB than what I already now > so I > > > > can > > > > > never be 100% certain but I think some one would have told us > by > > > > now > > > > > if there was a quicker way. > > > > > > > > > > I have only posted GUI methods at the UKB because 'we' need to > > > > > understand the principles before we can use more advanced > (semi- > > > > auto > > > > > methods) like file handling functions/script/COM/ODBC methods > etc. > > > > > If you already have skills in those areas it might not take > long > > > to > > > > > do but if you have to learn it first it will take longer > because > > > > you > > > > > have to get up to speed for a one off procedure. > > > > > > > > > > Either way, AFAIK, you have to have text file lists for every > sub- > > > > > category of every category. > > > > > > > > > > In time I am happy to learn advanced methods but in the > interim I > > > > > find setting up a database does not take long once you have > the > > > > > subcategory component lists carefully labelled. > > > > > > > > > > From memory you just need to slip the lists into the > Watchlists > > > > > folder and run the code (category by category - there are only > > > > three > > > > > major categories - admittedly there are a lot of industry > groups > > > > > lists to prepare). > > > > > > > > > > If you haven't got the Industry lists prepared you could use > > > > > Information/Categories functions and File I/O Functions to > write > > > > > them, from the US-Stocks database to a text file. > > > > > > > > > > The next step for the DM section of the UKB is to write > > > procedures > > > > to > > > > > help people learn how to do that type of thing - that is a > little > > > > bit > > > > > down the track though. > > > > > > > > > > brian_z > > > > > > > > > > > > > > > > > > > > --- In [email protected] <amibroker% > 40yahoogroups.com>, "Louis > > > Préfontaine" > > > > > <rockprog80@> wrote: > > > > > > > > > > > > Hi Brian, > > > > > > > > > > > > Thanks a lot for the kind words! I sure am coming froma long > > > > way, > > > > > and > > > > > > thanks to you and to others who helped me I am getting > better > > > > > everyday using > > > > > > Amibroker! > > > > > > > > > > > > There are two files on Jim website: > > > > > > > > > > > > 1) The database in .zip with all the tickers in the correct > > > > > categories; > > > > > > 2) The database in .xls with all the tickers listed with > > > > > categories, name, > > > > > > eps, etc. > > > > > > > > > > > > I already know how to set the first database correctly with > > > > Yahoo, > > > > > but I > > > > > > need to delete the .OB after the tickers to use the database > > > > wuith > > > > > my > > > > > > real-time provider. So this is why I used the second > database > > > > with > > > > > Excel > > > > > > and deleted the .OB. But then, that's where I don't know how > > > to > > > > > put that > > > > > > information back in place to be sure the tickers will be in > the > > > > > correct > > > > > > industries/markets, etc. > > > > > > > > > > > > I read in the manual that categoryAddSymbol can add symbols > to > > > > > whatever > > > > > > category I choose, but the problem is still the same: to > have a > > > > > scan of all > > > > > > the tickers going in the category restaurant (as an > example) I > > > > > would have to > > > > > > manually put them in "restaurants", and considering Jim's DB > > > has > > > > > tons of > > > > > > different categories this would take me forever! > > > > > > > > > > > > Is there a faster way to get there? > > > > > > > > > > > > Thanks! > > > > > > > > > > > > Louis > > > > > > > > > > > > > > > > > > 2008/3/21, brian_z111 <brian_z111@>: > > > > > > > > > > > > > > If it is in Jim's DB then you can get it out, in any > > > > category, > > > > > and > > > > > > > get it back,in any category (via Watchlists). > > > > > > > > > > > > > > categoryAddSymbol uses one of the following: > > > > > > > > > > > > > > categoryMarket > > > > > > > categoryGroup > > > > > > > categorySector > > > > > > > categoryIndustry > > > > > > > categoryWatchlist > > > > > > > categoryFavorite > > > > > > > categoryIndex > > > > > > > > > > > > > > You have come a long way in a short time so you maybe > miss a > > > few > > > > > > > points. > > > > > > > > > > > > > > Doing it yourself is a tedious business at times but you > > > really > > > > > learn > > > > > > > your craft that way. > > > > > > > > > > > > > > I can't do more now. > > > > > > > I'm getting tired and don't do good work in that state. > > > > > > > > > > > > > > I am impressed with your progress. > > > > > > > > > > > > > > brian_z > > > > > > > > > > > > > > --- In [email protected] <amibroker% > 40yahoogroups.com><amibroker% > > > > > 40yahoogroups.com>, "Louis > > > > > > > Préfontaine" > > > > > > > <rockprog80@> wrote: > > > > > > > > > > > > > > > > Hi Brian, > > > > > > > > > > > > > > > > The problem is that when I want to import back to AB, > all I > > > > can > > > > > > > change is > > > > > > > > the group, and I can only modify this group by group. I > > > don't > > > > > see > > > > > > > how I can > > > > > > > > import everything back in the right industry, as setted > by > > > > Jim. > > > > > > > > > > > > > > > > Louis > > > > > > > > > > > > > > > > 2008/3/18, brian_z111 <brian_z111@>: > > > > > > > > > > > > > > > > > > Try this: > > > > > > > > > > > > > > > > > > a) convert CSV lists >> text file > > > > > > > > > b) import to Watchlists > > > > > > > > > c) use categoryAddSymbol to move from WL to > > > > > Markets/Groups/Sectors > > > > > > > > > > > > > > > > > > (as per "SetUp A Custom Database/Nasdaq" at the UKB > > > > > > > > > > > > > > > > > > I think it is also possible using AFL (even within AB) > > > but > > > > > others > > > > > > > > > could help you more with that than yours truly. > > > > > > > > > > > > > > > > > > brian_z > > > > > > > > > > > > > > > > > > --- In [email protected] <amibroker% > 40yahoogroups.com><amibroker% > > > > > 40yahoogroups.com><amibroker% > > > > > > > 40yahoogroups.com>, "Louis > > > > > > > > > > > > > > > > Préfontaine" > > > > > > > > > <rockprog80@> wrote: > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > I really enjoyed using Jim's tickers > > > > > > > > > > http://icc-az.com/icc%2Daz/default.html?http% > 3A//icc- > > > > > az.com/icc% <http://az.com/icc%25>< > > > http://icc-az.com/icc%2Daz/default.html?http%3A//icc- > > > > > az.com/icc%25> > > > > > > > <http://icc-az.com/icc%2Daz/default.html?http%3A//icc- > > > > az.com/icc% <http://az.com/icc%25> > > > > > 25> > > > > > > > > > 252Daz/ > > > > > > > > > > > > > > > > > > > > However, I see that this is Yahoo's formatting with > > > e.g. > > > > > AAAA.OB > > > > > > > > > for pink > > > > > > > > > > sheets while my provider would prefer simply AAAA. I > > > > tried > > > > > to > > > > > > > > > remove the > > > > > > > > > > .OB with Excel, and did it correctly, but then I > don't > > > > know > > > > > how > > > > > > > to > > > > > > > > > import > > > > > > > > > > the files WITH the categories/industries as Jim > setted > > > > them > > > > > up. > > > > > > > In > > > > > > > > > the > > > > > > > > > > import wizard, there are no options for those > > > categories, > > > > so > > > > > > > would > > > > > > > > > there be > > > > > > > > > > another way to do this? > > > > > > > > > > > > > > > > > > > > Thanks, > > > > > > > > > > > > > > > > > > > > Louis > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > p.s. I will try to redownload Amiquote to use Yahoo > > > with > > > > > those, > > > > > > > but > > > > > > > > > would > > > > > > > > > > enjoy using my intraday data if possible. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
