Monday – Friday : 9:00 AM – 6:30 PM

HMA Trend line

The HMA (Hull Moving Average) Trend Line AFL code for Amibroker stands out among traders. When integrated with Amibroker Data Feeder, this code becomes a robust tool. It calculates the Hull Moving Average, offering a smoother representation of price trends. Traders rely on this code to accurately identify trends and optimize entry and exit points in their strategies, leveraging real-time market data from Amibroker Data Feeder for precise analysis.

/_SECTION_BEGIN("Hull Moving Average");
 // Hull Moving Average
 P = ParamField("Price field",-1);
 period = Param("Periodo",16,0,512);
 sqrtperiod = sqrt(period);
 Hull = WMA(2*WMA(P,period/2)-WMA(P,period),LastValue(sqrtperiod));
 Colore = IIf(Hull >= Ref(Hull,-1),ParamColor("Colore Up",colorWhite),ParamColor("Colore Down",colorViolet));

Open chat
Hi, how can I help you?