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

RE: [amibroker] Industry groups



PureBytes Links

Trading Reference Links




<FONT face=Arial color=#0000ff 
size=2>Dave,
I 
originally looked to strformat when trying to decipher a way to do this as well. 
Unlike you,  I could not find a solution hence my long hand approach 
:)
 
Regards, 
Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: Dave Merrill 
[mailto:dmerrill@xxxxxxx]Sent: Tuesday, December 30, 2003 7:06 
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: RE: [amibroker] 
Industry groups
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> 
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> 
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 
  color=#000000>"!ID00"+<FONT 
  size=2>IndustryID(<FONT 
  size=2>0<FONT face=Arial 
  color=#000000>);
  L2=<FONT 
  color=#000000>"!ID0"+<FONT 
  size=2>IndustryID(<FONT 
  size=2>0<FONT face=Arial 
  color=#000000>);
  L3=<FONT 
  color=#000000>"!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 
  size=2> 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 
  color=#000000>(<FONT 
  size=2>C<FONT 
  size=2>,IndustryID(<FONT 
  size=2>1),<FONT 
  size=2>colorWhite<FONT 
  color=#000000>,64<FONT 
  color=#282828 size=2><FONT face=Arial 
  color=#000000>);
  Plot<FONT 
  color=#000000>(MA<FONT 
  size=2>(C<FONT 
  face=Arial>,<FONT 
  size=2>20),""<FONT 
  size=2>,colorBlue<FONT 
  face=Arial>,<FONT 
  size=2>1<FONT face=Arial 
  color=#000000>);
  Plot<FONT 
  color=#000000>(MA<FONT 
  size=2>(C<FONT 
  face=Arial>,<FONT 
  size=2>50),""<FONT 
  size=2>,colorYellow<FONT 
  face=Arial>,<FONT 
  size=2>1<FONT face=Arial 
  color=#000000>);
  Title<FONT 
  color=#000000>="Industry Group = 
  "+IndustryID<FONT 
  size=2>(1)+ " 
  ("+industry+")"<FONT 
  color=#282828 
size=2>;Send 
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 


Yahoo! Groups Links
  To visit your group on the web, go to:<A 
  href="">http://groups.yahoo.com/group/amibroker/  

  To unsubscribe from this group, send an email to:<A 
  href="">amibroker-unsubscribe@xxxxxxxxxxxxxxx  

  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 



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.