Thanks Herman, but I not able to get your answer.
If you find the time to correct my code, it will be much appreciated.
Anyway, I found another piece of code at page 539 of "Introduction to
Amibroker" by Howard Bandy.
This code too gives me a "syntax" error.
If Howard or something else finds time to clarify, it will be appreciated too
================
//introduction to amibroker p.539
MaLen =5;
for (i = MaLen-1; i<BarCount; i++)
{
Summer = 0;
for (j = 0; J<MALen; j++)
{
Summer = Summer + C[i-j];
}
mm(i) = Summer/MaLen;
}
--- In [email protected], Herman <psy...@...> wrote:
>
> Use [] for subscripts.
>
> Define variables before using them inside a loop (mm).
>
> herman
>
>
> > Hi,
>
> > My purpose is to rebuild the MA function with the "FOR... NEXT.... loops.
> > Could you please check this formula, that gives me two "syntax" errors?
>
>
> > _Sum=0;
> > LEN =10;
>
>
> > for (i= LEN; i<BarCount; i++)
>
> > {
> > _Sum = 0;
> > for (j = i-LEN; J=i-1; J++)
> > {
> > _Sum= _Sum+C(j);
> > }
> > mm(i) = _Sum/LEN;
> > }
>
>
>
>
> > ------------------------------------
>
> > **** 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
>