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

RE: [amibroker] Looping question



PureBytes Links

Trading Reference Links




every 
time you use the array name as you did with volume you imply that ALL of 
the bars are to be used in the calc. 
<FONT face=Arial color=#0000ff 
size=2> 
when 
you use looping that implies that you want to work on the array one bar at a 
time so you should use Volume(i) to indicate which bar to 
use.
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>d

  
  <FONT 
  face=Tahoma size=2>-----Original Message-----From: Jayson 
  [mailto:jcasavant@xxxxxxxxxxx] Sent: Sunday, December 07, 2003 
  11:16 PMTo: 1amiSubject: [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. 







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.