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

Re: [amibroker] how do i make a recursive looping value?



PureBytes Links

Trading Reference Links




SetBarsRequired(-2,-2);
temp =
0;
myArray =
0;
for(i=0; i<BarCount; i++)
{
   temp = temp +
C[i];
   myarray[i] = temp/i;

}

Plot(myArray,"", colorRed);




On 10/23/2009 5:54 PM, Richard wrote:
hi everyone,

question: i read that AB doesn't support recursion (and doesn't allow me to call a function that performs a recursive goal).

I am stuck trying to work thru this.  So if, for some value of i (such as Close), I'm doing a loop of the following form:

for
(i=1; i<Barcount; i++); 

how do i get each new value of i to be the average of the new value of i which is then added to - and then averaged again - with each new i encountered (all Close values, say...)found, of course, from looping thru the next i, such that it gives me my objective i.e. the average Close value of all i's averaged together?

appreciate in advance your thoughts -

timekeeper (aka richard)

   



------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

  



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___