PureBytes Links
Trading Reference Links
|
Conceptually, this code is similar to the Zero Lag moving average
which IS simple enough for MS-FL and available at several sites.
I don't think the AB JMA code can be done in MS-FL because of the lack
of looping.
The TN1 array is easy enough - just a simple moving average of the
closing price over 'per' bars.
s1 is a variable whose value is determined by looping over the 'per'
number of periods. you would need to create a .dll with some external
language like 'C' or whatever to compute s1.
the s1 value is then added to the TN1 moving average to create the
Jurik moving average in the 'return' line.
The 'function' is present so that it can be repeatedly called from
different spots in a larger routine, passing what ever 'array' and
'per' that is required.
Finally, the 'param' statement allows you to adjust the number of
'per's after the chart is displayed.
ReefBreak
PS
>From comments I've read about this AB code, it is not EXACTLY the
Jurik moving average, just an approximation.
--- In equismetastock@xxxxxxxxxxxxxxx, spr_boy <no_reply@xxx> wrote:
>
>
>
>
> I found jurik formula for Amibroker but I dunno how to translate this
> formula into MS. Hopefully someone in this forum is willing to share
> a bit of his or her knowledge in coding
>
>
>
> function JMA( array, per )
> {
> TN1=MA(array,per);
> s1=0;
> for( i = 0; i < per; i=i+1 )
> {
> s1=s1+((per-(2*i)-1)/2)*Ref(array,-i);
> }
> return TN1+(((per/2)+1)*S1)/((per+1)*per);
> }
> k=Param("Period",15,1,100,1);
> J=JMA(C,k);
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/equismetastock/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:equismetastock-digest@xxxxxxxxxxxxxxx
mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|