Skip to main content

Hull Moving Average for Amibroker (AFL)

arthasfin about 16 years ago Amibroker (AFL)

  • Rating:
    4 / 5 (Votes 4)
  • Tags:
    amibroker, moving average

A very smoothed out moving average with little lag. Very similar to the Jurik moving average.

Indicator / Formula

Copy & Paste Friendly
SetChartBkColor( colorPaleBlue ) ;
SetChartOptions(0,chartShowDates|chartShowArrows);
Plot(C,"",colorWhite,styleCandle);
Price = ParamField("Price");
Period = Param("Period", 20,1,100,1);
function HMA(Price, Length)
{
return WMA(2*WMA(Price, Period/2)-WMA(Price, Period), sqrt(Period));
}
A = HMA(Price, Period);
colorA= IIf(A > Ref(A,-1), colorBrightGreen,colorRed);
Plot(A, "HMA", colorA, styleLine|styleThick);

0 comments

Leave Comment

Please login here to leave a comment.