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