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

RE: [amibroker] Industry groups



PureBytes Links

Trading Reference Links




Thanks 
John, that looks like it, I'll check it out and see if the conventions in AFL 
are the same.
<SPAN 
class=481394314-30122003> 
I know 
it probably seems like everyone who programs knows C++, but I don't 
(:-).
<SPAN 
class=481394314-30122003> 
<SPAN 
class=481394314-30122003>Dave
<BLOCKQUOTE 
>
  Hi Dave,
   
  perhaps I don't understand your question, but i 
  think TJs formatting-numbers conventions derive from something 
  like:
   
  <A 
  href="">http://www.cplusplus.com/ref/cstdio/printf.html
   
  -john
  <BLOCKQUOTE 
  >
    ----- Original Message ----- 
    <DIV 
    >From: 
    Dave Merrill 
    
    To: <A title=amibroker@xxxxxxxxxxxxxxx 
    href="">amibroker@xxxxxxxxxxxxxxx 
    Sent: Tuesday, December 30, 2003 4:06 
    AM
    Subject: RE: [amibroker] Industry 
    groups
    
    <SPAN 
    class=475475611-30122003>Nice idea Jason, thanks.
    <SPAN 
    class=475475611-30122003> 
    I 
    think I found a simpler way of generating the name of the QuotesPlus 
    industry index from its industry ID:
    <SPAN 
    class=475475611-30122003> 
    <SPAN 
    class=475475611-30122003>industry_id = IndustryID(0);industry_index = 
    "!ID" + StrFormat("%003.0f", industry_id);
    <SPAN 
    class=475475611-30122003> 
    <SPAN 
    class=475475611-30122003>While that does appear to work with 1- to 3-digit 
    industry IDs, I got there by trial and error; I'm not familiar with this 
    type of format string, which I assume is standard in some 
    programming language(s) I don't know. The docs say only: "for numbers 
    always use %f, %e or %g formatting, %d or %x will not work because there are 
    no integers in AFL."
    <SPAN 
    class=475475611-30122003> 
    <SPAN 
    class=475475611-30122003>Can someone point me to information on this? 
    Tomasz?
    <SPAN 
    class=475475611-30122003> 
    <SPAN 
    class=475475611-30122003>Thanks,
    <SPAN 
    class=475475611-30122003> 
    <SPAN 
    class=475475611-30122003>Dave
    <BLOCKQUOTE 
    >
      QP users may 
      find this useful.  
      <SPAN 
      class=309413907-29122003> 
      <SPAN 
      class=309413907-29122003><SPAN 
      class=309413907-29122003> Since QP provides us with an industry group 
      index for each of their industry groups (!ID001-198) it is a simple matter 
      to call that index as a foreign ticker when we select a stock. Just 
      copy the code to a free pane and it will plot the appropriate 
      industry group index.
      <SPAN 
      class=309413907-29122003> 
      Regards, 
      Jayson 
       
       <FONT 
      color=#282828 size=2>
      L1=<FONT 
      face=Arial>"!ID00"<FONT 
      size=2>+IndustryID(<FONT 
      size=2>0<FONT face=Arial 
      color=#000000>);
      L2=<FONT 
      face=Arial>"!ID0"<FONT 
      size=2>+IndustryID(<FONT 
      size=2>0<FONT face=Arial 
      color=#000000>);
      L3=<FONT 
      face=Arial>"!ID"<FONT 
      size=2>+IndustryID(<FONT 
      size=2>0<FONT face=Arial 
      color=#000000>);
      industry=<FONT 
      face=Arial>WriteIf<FONT 
      size=2>(IndustryID(<FONT 
      size=2>0) <10<FONT 
      size=2>,l1,WriteIf(<FONT 
      size=2>IndustryID(0<FONT 
      size=2>)>9 <FONT 
      size=2>AND<FONT 
      color=#000000> IndustryID<FONT 
      size=2>(0)<<FONT 
      size=2>100<FONT face=Arial 
      color=#000000>,l2,L3));
      SetForeign<FONT 
      color=#282828 size=2><FONT face=Arial 
      color=#000000>(industry);
      Plot<FONT 
      face=Arial>(<FONT 
      size=2>C<FONT 
      color=#000000>,IndustryID<FONT 
      size=2>(1),<FONT 
      size=2>colorWhite<FONT 
      color=#000000>,<FONT 
      size=2>64<FONT face=Arial 
      color=#000000>);
      Plot<FONT 
      face=Arial>(<FONT 
      size=2>MA(<FONT 
      size=2>C<FONT 
      color=#000000>,20<FONT 
      size=2>),"",<FONT 
      size=2>colorBlue<FONT 
      color=#000000>,<FONT 
      size=2>1<FONT face=Arial 
      color=#000000>);
      Plot<FONT 
      face=Arial>(<FONT 
      size=2>MA(<FONT 
      size=2>C<FONT 
      color=#000000>,50<FONT 
      size=2>),"",<FONT 
      size=2>colorYellow<FONT 
      color=#000000>,<FONT 
      size=2>1<FONT face=Arial 
      color=#000000>);
      Title<FONT 
      face=Arial>="Industry 
      Group = "+IndustryID<FONT 
      size=2>(1)+ " 
      ("+industry+")"<FONT 
      color=#282828 
  size=2>;


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





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 the Yahoo! Terms of Service.