[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: auto assign sector/industry question



PureBytes Links

Trading Reference Links

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 amibroker@xxxxxxxxxxxxxxx, "conrad_faber" <cfaber@xxx> 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 amibroker@xxxxxxxxxxxxxxx, "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.
> >
>



------------------------------------

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/