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

RE: [amibroker] Re: Question on User Defined Arrays (Static)



PureBytes Links

Trading Reference Links

Hi,

I'm finding it a little difficult to work out exactly what your trying to do so if you could post the  whole script it would be good.

A few things..

1) You don't use the Dim statement in AFL, just initialise the variables directly.

2) Here is the structure of the Do While Loop:

i=0;
do
{ 
   i++; 
} 
while( i < 100 ); 
WriteVal( i ); 


3) You have left off one parenthesis from your function "(A[i],M[i]]"
I think it should be "(A[i],M[i])"


Regards,
William Peters
www.amitools.com



-----Original Message-----
From: samgrayy [mailto:samgrayy@xxxxxxxx]
Sent: Wednesday December 3, 2003 8:08 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: Question on User Defined Arrays (Static)


I guess there is no response. I hope somebody takes a look at this.
Thanks in advance, 
SG

--- In amibroker@xxxxxxxxxxxxxxx, "samgrayy" <samgrayy@xxxx> wrote:
> Hi All, 
> 
> With the intro of the new looping constucts in AFL,  the scripting
hosts are not as useful as they were. 
> I am struggling a bit with the programming of a loop as follows: 
> 
> Dim Zones(3), Multipliers(3)
> A[0]= SomeValue; 
> A[1]= AnotherValue; 
> A[2]= ..; 
> M[0]= ..; 
> M[1]= ..; 
> M[2]= ..; 
> 
> Result=0 ; 
> i = 2;
> while( i >= 0 ){  
> Result= Result+ Function (A[i],M[i]] ; 
> }
> 
> Notice here that the arrays do not change with time (such as the
price array for example).
> 
> 
> Thanks in advance for any hint,
> Sam



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 http://docs.yahoo.com/info/terms/ 




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 http://docs.yahoo.com/info/terms/