Hull JMA function for Amibroker (AFL)
phester over 15 years ago Amibroker (AFL)
Combines the Hull MA and the JMA function, as listed on this site, into one indicator. Select then percentage you want, by sliding scale, for Hull & the JMA function.
Screenshots
Indicator / Formula
Copy & Paste Friendly
color = ParamColor( "Color", colorRed);
style = ParamStyle( "Style", styleThick);
label = ParamStr( "label text", "Hull_JMA" );
Price = ParamField("Price");
Period = Param("Period", 10,1,100,1);
function HMA1(Price, Period)
{
return WMA(2*WMA(Price, Period/2)-WMA(Price, Period), sqrt(Period));
}
function JMA1( 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);
}
a=Param("Hull_JMA",25,1,100,1);
k=Param("Period",10,1,100,1);
L = HMA1(C,k);
M=JMA1(C,k);
N=((L*a)+(M*(100-a)))/100;
Plot( N, label, color, style);2 comments
Leave Comment
Please login here to leave a comment.
GREAT
Thank for your contribution, it was great.