Conrad, The reboot actually works!
I was thinking all my efforts were in vain. But it comes out the way supposed to be. Thanks for your advise. Tony --- In [email protected], "conrad_faber" <[EMAIL PROTECTED]> wrote: > > Try a restart of your PC - sometimes there is broker.exe still running > in background (happened to me last night) - downside is you may lose > your updates. > Good luck > Conrad > > --- In [email protected], "wind sun" <wind_sun@> wrote: > > > > I followed the docs and tips to get the auto assignment of > > sector/industry working , which is confirmed. Here is what I did: > > > > a. modify the broker.sectors and broker.industries , remove the > > broker.workspace . > > > > b. restart amibroker and see the new sector/industry in the symbol tool. > > > > c. use the sample code posted on > > http://www.amibroker.com/newsletter/04-2000.html to update the > > secotr/industry and also add missed tickers to > > my database. > > > > > > > > /* change this line according to your data file name */ > > var filename = "industry_data.txt"; > > > > var fso, f, r; > > var ForReading = 1; > > var AmiBroker; > > var fields; > > var stock; > > > > /* Create AmiBroker app object */ > > AmiBroker = new ActiveXObject( "Broker.Application" ); > > > > /* ... and file system object */ > > fso = new ActiveXObject( "Scripting.FileSystemObject" ); > > > > /* open ASCII file */ > > f = fso.OpenTextFile( filename, ForReading); > > > > /* read the file line by line */ > > while ( !f.AtEndOfStream ) > > { > > > > r = f.ReadLine(); > > > > /* split the lines using comma as a separator */ > > fields = r.split(","); > > > > /* add a ticker - this is safe operation, in case that */ > > /* ticker already exists, AmiBroker returns existing one */ > > stock = AmiBroker.Stocks.Add( fields[ 0 ] ); > > > > stock.FullName = fields[ 1 ]; > > stock.IndustryID = parseInt( fields[ 2 ] ); > > > > } > > > > /* refresh ticker list and windows */ > > AmiBroker.RefreshAll(); > > > > > > d. check secotr/industry id for each tickers by the following sample > > codes posted on http://www.amibroker.com/newsletter/01-2000.html: > > > > for( i = 0; i < Qty; i++ ) > > { > > oStock = oStocks( i ); > > file.Write( oStock.Ticker + "," ); > > file.Write( oStock.FullName + "," ); > > file.Write( oStock.Address + "," ); > > file.Write( oStock.IndustryID + "," ); > > file.Write( oStock.MarketID + "," ); > > file.WriteLine( oStock.GroupID ); > > } > > file.Close(); > > WScript.Echo("Export finished" ); > > > > I saw the correct sector/industry id for each ticker. > > > > e. But when I restart amibroker, the software seams still pick up the > > old info, and I can't even see new tickers which I added into the > > database. I believe this is a very simple config issue, since I saw > > the corrct secotr/industry id in step d. > > > > Seams to me I updated a new database, but amibroker still pick up the > > old database. I don't want to try to create new database, since I have > > lots of stuff in the old one. > > > > Please advise. > > > > Thanks a lot. > > >
