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

Re: [amibroker] Looping question



PureBytes Links

Trading Reference Links





Sorry first line should be: x[0] = 
Volume[0];
<BLOCKQUOTE 
>
  ----- Original Message ----- 
  <DIV 
  >From: 
  Mark 
  H 
  To: <A title=amibroker@xxxxxxxxxxxxxxx 
  href="">amibroker@xxxxxxxxxxxxxxx 
  Sent: Sunday, December 07, 2003 11:30 
  PM
  Subject: Re: [amibroker] Looping 
  question
  
  I think it should be:
   
  x[0] = 0;
  for(i = 1; i < BarCount; i++)
  {
    x[i] = x[i-1]+Volume[i];
  }
   
  <BLOCKQUOTE 
  >
    ----- Original Message ----- 
    <DIV 
    >From: 
    <A title=jcasavant@xxxxxxxxxxx 
    href="">Jayson 
    To: <A title=amibroker@xxxxxxxxxxxxxxx 
    href="">1ami 
    Sent: Sunday, December 07, 2003 11:16 
    PM
    Subject: [amibroker] Looping 
    question
    
    I am trying to 
    get my mind wrapped around looping could some please explain to me why the 
    following code does not reflect the same thing as 
cum(v)?
    <SPAN 
    class=212060104-08122003> 
    <FONT 
    color=#282828 size=2>
    x=0<FONT color=#282828 
    size=2>;
    for( i =<FONT color=#ff00ff 
    size=2>1; i <<FONT 
    size=2>BarCount ; i++ )
    {
    x = x +Volume<FONT color=#282828 
    size=2>;
    }
    <SPAN 
    class=212060104-08122003>plot(x,"Test",5);
    <SPAN 
    class=212060104-08122003> 
    It 
    "seems" like I am saying " x= the last value of x plus volume" and that 
    would continue to increment by each days volume until the last bar. Of 
    course that is not happening at all. I am sure I am missing something 
    simple...any help appreciated
    <SPAN 
    class=212060104-08122003> 
    Regards, 
    Jayson 
     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. 
    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. 







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.