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

Re: [amibroker] Sector ID



PureBytes Links

Trading Reference Links

Hi Ara,

I use QuotePlus and all of the Mutual Funds have a sectorID '0' allocated
to them so there is no problem. You might want to try another database
retrieve.

However you could try the following code which I couldn't test because
all the tickers in my database have a valid sectorID.

Filter = 1;
Sector_Name = WriteIf( NOT IsNull( SectorID(0) ), SectorID(1), "None" );
AddTextColumn( Sector_Name, "Sector Name");


Regards,
William Peters
www.amitools.com


Monday, December 13, 2004, 10:33:39 PM, you wrote:

  
AK> Trying to determine the sector ID of an issue  ....
AK>  
AK> Using:
AK>  
AK> Sector_ID   = writeif(sectorID(0) <=63  ,SectorID(1),"None");
AK>  
AK> This works fine for stocks that do have a sector ID  defined,
AK> but when I look at a mutual fund that does not have a sector
AK> definition  (QP database), that program crashes.
AK>  
AK> How can I prevent a crash and use proper error  trapping?
AK>  
AK> Thanks
AK>  
AK> Ara



------------------------ Yahoo! Groups Sponsor --------------------~--> 
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

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

<*> 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/