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

Re: [amibroker] how can we tell if current stock is an index?



PureBytes Links

Trading Reference Links

Hello,

If your tickers are prefixed then you can use 

StrLeft( Name(), 1 ) == "^"

http://www.amibroker.com/guide/afl/afl_view.php?name=STRLEFT

All string manipulation functions are included in the User's Guide:
AFL reference: Category index:

http://www.amibroker.com/guide/afl/afl_index.php?m=2

under "String manipulation"

If you are interested in testing 'index' flag in Symbol->Information that
I mentioned

ticker = Name();
EnableScript("jscript");
<%
AB=AFL.CreateObject("Broker.Application");
AFL("IsIndex") = AB.Stocks(AFL("ticker")).Index;
%>

if( IsIndex) 
{
 ... your code
}


Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "Dave Merrill" <dmerrill@xxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, October 12, 2003 11:18 PM
Subject: RE: [amibroker] how can we tell if current stock is an index?


> sorry, I meant in AFL code.
> 
> I've thought about chuck's prefix idea, just wondering if there's something
> internal to AB that can do it.
> 
> also, is there a Substring() or Left() function in AFL?
> 
> dave
> 
> > -----Original Message-----
> > From: Tomasz Janeczko [mailto:amibroker@xxxxxx]
> > Sent: Sunday, October 12, 2003 5:01 PM
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: Re: [amibroker] how can we tell if current stock is an index?
> >
> >
> > Hello,
> >
> > Symbol->Information: "Index" check box.
> >
> > Best regards,
> > Tomasz Janeczko
> > amibroker.com
> > ----- Original Message -----
> > From: "Dave Merrill" <dmerrill@xxxxxxx>
> > To: <amibroker@xxxxxxxxxxxxxxx>
> > Sent: Sunday, October 12, 2003 10:31 PM
> > Subject: [amibroker] how can we tell if current stock is an index?
> >
> >
> > >
> > >
> > > dave
> > >
> > >
> > > Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> > > Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
> > > -----------------------------------------
> > > Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> > > (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> > > --------------------------------------------
> > > Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> >
> > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
> >
> >
> >
> 
> 
> Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
> 
> 
> 
> 
> 
> 
> Send BUG REPORTS to bugs@xxxxxxxxxxxxx
> Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
> -----------------------------------------
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
> --------------------------------------------
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
> 

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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