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

RE: [amibroker] Looping question



PureBytes Links

Trading Reference Links




You just need to define 
volume as an array within the loop, and the first element of the array is 
zero


x=<FONT 
color=#ff00ff>0;<FONT 
color=#800000>
for<FONT 
size=2>( i =0; i 
<BarCount-1<FONT 
color=#282828> ; i++ )
{
x = x +<FONT 
size=2>V[i]<FONT 
color=#282828>;
}
<SPAN 
class=212060104-08122003>plot(x,"Test",5);
 
Cheers,Graham<A 
href="">http://groups.msn.com/asxsharetrading<A 
href="">http://groups.msn.com/fmsaustralia 


  
  <FONT 
  face=Tahoma size=2>-----Original Message-----From: Jayson 
  [mailto:jcasavant@xxxxxxxxxxx] Sent: Monday, 8 December 2003 12: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.