# HMA param change

Dear Experts & Tomasz..

iam using Hma code

``````Period = Param("Period:", 20, 1, 200);
SqrtPeriod = sqrt(Param("Square Root of Period:", 4, 1, 20));

HullMA = WMA(2 * WMA(C, Period / 2) - WMA(C, Period), SqrtPeriod);
Plot(HullMa, _DEFAULT_NAME(), ParamColor("Hull Moving Average Color", colorBlue));
``````

it's get input from "Param" via parameter window..
but
i don't need parameter properties window via input, just use default value of hma..

so i changed the code
`//Period = Param("Period:", 20, 1, 200);
SqrtPeriod = sqrt(20("Square Root of Period:", 4, 1, 20));

HullMA = WMA(2 * WMA(C, Period / 2) - WMA(C, Period), SqrtPeriod);
Plot(HullMa, _DEFAULT_NAME(), ParamColor("Hull Moving Average Color", colorBlue));`
but i got error..

Find out â€śParam - defaultvalâ€ť in code & replace Param function with that numberâ€¦â€¦â€¦â€¦â€¦.

1 Like

@madhan, just a short note to notify you that that HMA (Hull Moving Average) is available natively as a function in AmiBroker.

Take a look at its documentation:

https://www.amibroker.com/guide/afl/hma.html

Also, to get an overview of all the other available 'averages', please, browse the section named "Moving averages, summation" in the:

AFL Function Reference - Categorized list of functions

1 Like

Dear Fossil..
got your point & solved my query..

Thanks

Dear Beppe,

Thanks for detailed information..pickup hereafter..