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

[amibroker] Re: 10 uses for #include



PureBytes Links

Trading Reference Links




hello frank,
 
go to message #38828
 
 
regards,
 
dirk
 
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Frank Milo 
  
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Friday, November 28, 2003 8:25 
  PM
  Subject: Re: [amibroker] to TOMASZ: how 
  to loop through a list of tickers ?
  
  Dirk,
   
  I did a message board search on <FONT 
  face=Verdana color=#000080 size=2>"10 uses for #include" , but it didn't find 
  any thing. Can you please point me to Herman's post?
   
  Thanks
  Frank
  <BLOCKQUOTE 
  >
    ----- Original Message ----- 
    <DIV 
    >From: 
    dirk 
    schreiber 
    To: <A title=amibroker@xxxxxxxxxxxxxxx 
    href="">amibroker@xxxxxxxxxxxxxxx 
    Sent: Wednesday, November 26, 2003 7:09 
    PM
    Subject: Re: [amibroker] to TOMASZ: how 
    to loop through a list of tickers ?
    
    hello herman,
     
    thank you very much for your 
    code - works like a charm.
    the moment i saw your code i 
    remembered your post about the "10 uses for #include". should have read that 
    one more closely ...
     
    dirk
     
    <BLOCKQUOTE 
    >
      ----- Original Message ----- 
      <DIV 
      >From: 
      Herman 
      vandenBergen 
      To: <A 
      title=amibroker@xxxxxxxxxxxxxxx 
      href="">amibroker@xxxxxxxxxxxxxxx 
      
      Sent: Wednesday, November 26, 2003 
      11:33 PM
      Subject: RE: [amibroker] to TOMASZ: 
      how to loop through a list of tickers ?
      
      <FONT face=Arial color=#0000ff 
      size=2>Hello,
      <FONT face=Arial color=#0000ff 
      size=2> 
      <FONT face=Arial color=#0000ff 
      size=2>The Exploration below will generate a complete correlation 
      table for the N100. 
      <FONT face=Arial color=#0000ff 
      size=2> 
      <FONT face=Arial color=#0000ff 
      size=2>The leftmost column refers to the stock by number, since we do not 
      have string arrays in afl. You can add more colors to make this a heat map 
      that shows you instantly where pos/neg correlation exist. You can also use 
      the Osaka plugin to create csv exports for further analysis in Excel. The 
      second piece of code is an include file; copy it to your Include directory 
      before running the Exploration.
      <FONT face=Arial color=#0000ff 
      size=2> 
      <FONT face=Arial color=#0000ff 
      size=2>herman
      
      
      
      <FONT face=Arial color=#000000 
      size=2>// Exploration N100 Correlation table<FONT 
      face=Arial> <FONT 
      color=#ff0000>Buy=<FONT 
      color=#ff0000>Sell=<FONT 
      color=#ff0000>Short=<FONT 
      color=#ff0000>Cover=<FONT 
      color=#ff00ff>0<FONT 
      color=#000000>; StkNum = Status<FONT 
      color=#000000>(<FONT 
      color=#ff00ff>"StockNum"<FONT 
      face=Arial>); <FONT 
      color=#ff0000>Filter = <FONT 
      color=#0000ff>Status(<FONT 
      color=#ff00ff>"LastBarInTest") <FONT 
      color=#ff0000>AND StkNum < <FONT 
      color=#ff00ff>50<FONT 
      color=#000000>; AddColumn<FONT 
      color=#000000>(StkNum," "<FONT 
      color=#000000>,1.0<FONT 
      size=2>); n = StkNum; 
      #include<FONT 
      size=2> <NtoN100Ticker.afl> 
      Ticker1 = Ticker; C1 = <FONT 
      color=#0000ff>Foreign(Ticker1,<FONT 
      color=#ff00ff>"C"<FONT 
      color=#000000>);    <FONT 
      color=#ff0000>for(m=<FONT 
      color=#ff00ff>50;m<=<FONT 
      color=#ff00ff>99<FONT 
      color=#000000>;m++)    {    n=m; 
         <FONT 
      color=#ff0000>#include<FONT 
      face=Arial> <NtoN100Ticker.afl> 
         Ticker2 = Ticker;    C2 = 
      Foreign<FONT 
      color=#000000>(Ticker2,<FONT 
      color=#ff00ff>"C"<FONT 
      color=#000000>);       Corr = 
      Correlation(C1, C2, 
      8<FONT 
      face=Arial> );    Color = 
      IIf<FONT 
      color=#000000>(Corr>0<FONT 
      color=#000000>,8<FONT 
      color=#000000>,4); 
      // Add colors to make a heat 
      map 
         AddColumn<FONT 
      color=#000000>(Corr,Ticker,1.3<FONT 
      color=#000000>,1<FONT 
      color=#000000>,Color); 
      <FONT 
      face="Courier New" color=#000000><FONT face=Arial 
      size=2>   }<SPAN 
      class=870081922-26112003>
      
      
      
      // Include 
      file
      Ticker 
      =     <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>0 , <FONT 
      color=#ff00ff>"AAPL"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>1 , <FONT 
      color=#ff00ff>"ADBE"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>2 , <FONT 
      color=#ff00ff>"ADCT"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>3 , <FONT 
      color=#ff00ff>"ALTR"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>4 , <FONT 
      color=#ff00ff>"AMAT"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>5 , <FONT 
      color=#ff00ff>"AMGN"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>6 , <FONT 
      color=#ff00ff>"AMZN"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>7 , <FONT 
      color=#ff00ff>"APCC"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>8 , <FONT 
      color=#ff00ff>"APOL"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>9 , <FONT 
      color=#ff00ff>"BBBY"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>10 , <FONT 
      color=#ff00ff>"BEAS"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>11 , <FONT 
      color=#ff00ff>"BIIB"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>12 , <FONT 
      color=#ff00ff>"BMET"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>13 , <FONT 
      color=#ff00ff>"BRCD"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>14 , <FONT 
      color=#ff00ff>"BRCM"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>15 , <FONT 
      color=#ff00ff>"CDWC"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>16 , <FONT 
      color=#ff00ff>"CEPH"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>17 , <FONT 
      color=#ff00ff>"CHIR"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>18 , <FONT 
      color=#ff00ff>"CHKP"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>19 , <FONT 
      color=#ff00ff>"CHRW"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>20 , <FONT 
      color=#ff00ff>"CIEN"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>21 , <FONT 
      color=#ff00ff>"CMCSA"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>22 , <FONT 
      color=#ff00ff>"CMVT"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>23 , <FONT 
      color=#ff00ff>"COST"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>24 , <FONT 
      color=#ff00ff>"CPWR"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>25 , <FONT 
      color=#ff00ff>"CSCO"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>26 , <FONT 
      color=#ff00ff>"CTAS"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>27 , <FONT 
      color=#ff00ff>"CTXS"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>28 , <FONT 
      color=#ff00ff>"DELL"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>29 , <FONT 
      color=#ff00ff>"DISH"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>30 , <FONT 
      color=#ff00ff>"DLTR"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>31 , <FONT 
      color=#ff00ff>"EBAY"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>32 , <FONT 
      color=#ff00ff>"ERICY"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>33 , <FONT 
      color=#ff00ff>"ERTS"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>34 , <FONT 
      color=#ff00ff>"ESRX"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>35 , <FONT 
      color=#ff00ff>"EXPD"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>36 , <FONT 
      color=#ff00ff>"FAST"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>37 , <FONT 
      color=#ff00ff>"FHCC"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>38 , <FONT 
      color=#ff00ff>"FISV"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>39 , <FONT 
      color=#ff00ff>"FLEX"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>40 , <FONT 
      color=#ff00ff>"GENZ"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>41 , <FONT 
      color=#ff00ff>"GILD"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>42 , <FONT 
      color=#ff00ff>"GNTX"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>43 , <FONT 
      color=#ff00ff>"HGSI"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>44 , <FONT 
      color=#ff00ff>"HSIC"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>45 , <FONT 
      color=#ff00ff>"IACI"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>46 , <FONT 
      color=#ff00ff>"ICOS"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>47 , <FONT 
      color=#ff00ff>"INTC"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>48 , <FONT 
      color=#ff00ff>"INTU"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>49 , <FONT 
      color=#ff00ff>"IVGN"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>50 , <FONT 
      color=#ff00ff>"JDSU"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>51 , <FONT 
      color=#ff00ff>"JNPR"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>52 , <FONT 
      color=#ff00ff>"KLAC"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>53 , <FONT 
      color=#ff00ff>"LAMR"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>54 , <FONT 
      color=#ff00ff>"LLTC"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>55 , <FONT 
      color=#ff00ff>"LNCR"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>56 , <FONT 
      color=#ff00ff>"MCHP"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>57 , <FONT 
      color=#ff00ff>"MEDI"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>58 , <FONT 
      color=#ff00ff>"MERQ"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>59 , <FONT 
      color=#ff00ff>"MLNM"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>60 , <FONT 
      color=#ff00ff>"MNST"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>61 , <FONT 
      color=#ff00ff>"MOLX"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>62 , <FONT 
      color=#ff00ff>"MSFT"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>63 , <FONT 
      color=#ff00ff>"MXIM"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>64 , <FONT 
      color=#ff00ff>"NTAP"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>65 , <FONT 
      color=#ff00ff>"NVDA"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>66 , <FONT 
      color=#ff00ff>"NVLS"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>67 , <FONT 
      color=#ff00ff>"NXTL"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>68 , <FONT 
      color=#ff00ff>"ORCL"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>69 , <FONT 
      color=#ff00ff>"PAYX"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>70 , <FONT 
      color=#ff00ff>"PCAR"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>71 , <FONT 
      color=#ff00ff>"PDCO"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>72 , <FONT 
      color=#ff00ff>"PETM"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>73 , <FONT 
      color=#ff00ff>"PIXR"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>74 , <FONT 
      color=#ff00ff>"PSFT"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>75 , <FONT 
      color=#ff00ff>"PTEN"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>76 , <FONT 
      color=#ff00ff>"QCOM"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>77 , <FONT 
      color=#ff00ff>"QLGC"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>78 , <FONT 
      color=#ff00ff>"RFMD"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>79 , <FONT 
      color=#ff00ff>"ROST"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>80 , <FONT 
      color=#ff00ff>"RYAAY"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>81 , <FONT 
      color=#ff00ff>"SANM"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>82 , <FONT 
      color=#ff00ff>"SBUX"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>83 , <FONT 
      color=#ff00ff>"SEBL"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>84 , <FONT 
      color=#ff00ff>"SIAL"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>85 , <FONT 
      color=#ff00ff>"SNDK"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>86 , <FONT 
      color=#ff00ff>"SNPS"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>87 , <FONT 
      color=#ff00ff>"SPLS"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>88 , <FONT 
      color=#ff00ff>"SPOT"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>89 , <FONT 
      color=#ff00ff>"SSCC"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>90 , <FONT 
      color=#ff00ff>"SUNW"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>91 , <FONT 
      color=#ff00ff>"SYMC"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>92 , <FONT 
      color=#ff00ff>"TEVA"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>93 , <FONT 
      color=#ff00ff>"TLAB"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>94 , <FONT 
      color=#ff00ff>"VRSN"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>95 , <FONT 
      color=#ff00ff>"VRTS"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>96 , <FONT 
      color=#ff00ff>"WFMI"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>97 , <FONT 
      color=#ff00ff>"XLNX"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>98 , <FONT 
      color=#ff00ff>"XRAY"<FONT 
      size=2>, <FONT 
      color=#0000ff>WriteIf(n==<FONT 
      color=#ff00ff>99 , <FONT 
      color=#ff00ff>"YHOO" , <FONT 
      color=#ff00ff>""<FONT face=Arial color=#000000 
      size=2> 
      ))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));   
      
      
      
      
      <SPAN 
      class=870081922-26112003> -----Original 
      Message-----From: dirk schreiber 
      [mailto:tianatrading@xxxxxxxxx]Sent: November 27, 2003 2:03 
      AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] 
      to TOMASZ: how to loop through a list of tickers 
      ?
      
        i'm a bit surprised to see 
        that noone is answering my call.
        so may i ask you directly, 
        tomasz, if what i asked is possible and if you could indicate me the 
        right way to code this ??
         
        thank you,
         
        dirk
         
        <BLOCKQUOTE 
        >
          ----- Original Message ----- 
          <DIV 
          >From: 
          <A title=tianatrading@xxxxxxxxx 
          href="">dirk schreiber 
          To: <A 
          title=amibroker@xxxxxxxxxxxxxxx 
          href="">amibroker@xxxxxxxxxxxxxxx 
          
          Sent: Monday, November 24, 2003 
          12:14 PM
          Subject: Re: [amibroker] how to 
          loop through a list of tickers ?
          
          noone ???
          i'll try again: as an 
          example, is it possible to calculate all correlations of the stocks 
          constituting the nasdaq100 in one scan?
          my code below will explore 
          the correlations of IBM with the other 99 constituents of my 
          nasdaq100 watchlist. is there a way in afl to tell amibroker to first 
          calculate these correlations for one stock, then go to the next and do 
          the same there and so forth, so that i could find out the 10 highest 
          correlations within the nasdaq100 for example ??
          i have tried many ideas but 
          i am stuck (haven't mastered the new loop formulas very well yet) 
          ...
           
          any help would be greatly 
          appreciated, maybe this procedure would interest other amibroker users 
          as well.
           
          thanks in 
          advance,
           
          dirk
           
          
          pair=<FONT 
          color=#ff00ff>"IBM";
          x=<FONT 
          color=#0000ff>Foreign(pair,<FONT 
          color=#ff00ff>"C");
          y=C;
          xpc=ROC(x,<FONT 
          color=#ff00ff>1);
          ypc=ROC(y,<FONT 
          color=#ff00ff>1);
          Graph0<FONT face=Arial 
          size=2>=Correlation(xpc,ypc,<FONT 
          color=#ff00ff>20);
          Graph1<FONT face=Arial 
          size=2>=Correlation(xpc,ypc,<FONT 
          color=#ff00ff>200);
          Filter<FONT 
          face=Arial>=Graph0>0.7 AND 
          Graph1><FONT 
          color=#ff00ff>0.5;
          AddColumn<FONT 
          face=Arial>(Graph0,<FONT 
          color=#ff00ff>"Cor20",<FONT 
          color=#ff00ff>1.2<FONT 
          color=#000000>);
          AddColumn<FONT 
          face=Arial>(Graph1,<FONT 
          color=#ff00ff>"Cor200",<FONT 
          color=#ff00ff>1.2<FONT 
          color=#000000>);
          AddColumn<FONT 
          face=Arial><FONT 
          color=#000000>(Graph0+Graph1,<FONT 
          color=#ff00ff>"total",<FONT 
          color=#ff00ff>1.2<FONT 
          color=#000000>);
          Buy<FONT 
          face=Arial>=<FONT 
          color=#ff00ff>0;<FONT 
          color=#000080>
           
           
          <BLOCKQUOTE 
          >
            ----- Original Message ----- 
            <DIV 
            >From: 
            <A title=tianatrading@xxxxxxxxx 
            href="">dirk schreiber 
            To: <A 
            title=amibroker@xxxxxxxxxxxxxxx 
            href="">amibroker@xxxxxxxxxxxxxxx 
            
            Sent: Thursday, November 20, 
            2003 6:56 PM
            Subject: [amibroker] how to 
            loop through a list of tickers ?
            
            
            hello,
             
            this is my first 
            post.
            i have been working my 
            way into the ideas behind pair trading, reading the interesting 
            posts by yuki a few months ago and writing some code.
            here is where i'm stuck: 
            when i calculate correlation, price ratio and other things like beta 
            ratio it is my understanding that when scanning my database i can 
            only compare one stock at a time with the rest of my universe. -- is 
            it possible to calculate all correlations between all stocks in one 
            scan?? i know that with big groups this would mean millions of 
            calculations, but for a group like the n100 this should be possible? 
            
            can this be done by some 
            sort of loop?
            i searched the mailing 
            list archive and found only one hint by DT, talking about maybe 
            using something like   Status("STOCKNUM") == 0   
            , but i could not work that out ...
             
            any help is 
            appreciated,
            thanks in 
            advance,
             
            <FONT face=Arial color=#000080 
            size=2>dirk<FONT face=Arial 
            size=2>Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
            suggest@xxxxxxxxxxxxx-----------------------------------------Post 
            AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web 
            page: <A 
            href=""><FONT 
            face=Arial 
            size=2>http://groups.yahoo.com/group/amiquote/messages/)<FONT 
            face=Arial 
            size=2>--------------------------------------------Check group 
            FAQ at: <A 
            href=""><FONT 
            face=Arial 
            size=2>http://groups.yahoo.com/group/amibroker/files/groupfaq.html<FONT 
            face=Arial size=2> Your use of Yahoo! Groups is subject 
            to the Yahoo! Terms of 
            Service. 
            
            
            Do you Yahoo!?<A 
            href=""><FONT face=Arial 
            size=2>Protect your identity with Yahoo! Mail 
          AddressGuard<FONT face=Arial 
          size=2>Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
          suggest@xxxxxxxxxxxxx-----------------------------------------Post 
          AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web 
          page: <A 
          href=""><FONT 
          face=Arial 
          size=2>http://groups.yahoo.com/group/amiquote/messages/)<FONT 
          face=Arial 
          size=2>--------------------------------------------Check group FAQ 
          at: <A 
          href=""><FONT 
          face=Arial 
          size=2>http://groups.yahoo.com/group/amibroker/files/groupfaq.html<FONT 
          face=Arial size=2> Your use of Yahoo! Groups is subject to 
          the Yahoo! Terms of 
          Service. 
          
          
          Do you Yahoo!?<A 
          href=""><FONT face=Arial 
          size=2>Protect your identity with Yahoo! Mail 
        AddressGuard<FONT face=Arial 
        size=2>Send BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
        suggest@xxxxxxxxxxxxx-----------------------------------------Post 
        AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web 
        page: <A 
        href=""><FONT 
        face=Arial 
        size=2>http://groups.yahoo.com/group/amiquote/messages/)<FONT 
        face=Arial size=2>--------------------------------------------Check 
        group FAQ at: <A 
        href=""><FONT 
        face=Arial 
        size=2>http://groups.yahoo.com/group/amibroker/files/groupfaq.html<FONT 
        face=Arial size=2> Your use of Yahoo! Groups is subject to 
        the Yahoo! Terms of 
        Service. 
        
        
        Do you Yahoo!?<A 
        href=""><FONT face=Arial 
        size=2>Protect your identity with Yahoo! Mail 
      AddressGuardSend 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 
      Your use of Yahoo! Groups is subject to the <A 
      href="">Yahoo! Terms of Service. 
      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 
    Your use of Yahoo! Groups is subject to the <A 
    href="">Yahoo! Terms of Service. 
    
    
    
    Do you Yahoo!?Protect 
    your identity with Yahoo! Mail AddressGuardSend 
  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 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor


  ADVERTISEMENT 









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




Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard