Thank you to all the developers of Zorro
I am new to programming and I wanted to add an HMA script to the indicators.c section so I can use this MA.

I have entered the following code into indicators.c but it is not working and I am not sure whats wrong besides ceiling and floor functions not being indentified. I was wondering if someone could help me fix this HMA script or let me know whats missing:

// HMA PriceSeries( NumericSeries ), Period( NumericSimple );
var HMA(var* Data,int Period)
{
Vars:
var * WMA = series(*Data, Period);
var * halvedLength;
var * sqrRootLength;
var * Value1;
var * Value2;
var* Value3;


if ((ceiling(Period / 2) - (Period / 2)) <= 0.5) then
halvedLength = ceiling(Period / 2)
else
halvedLength = floor(Period / 2);

if ((ceiling(SquareRoot(Period)) - SquareRoot(Period)) <= 0.5) then
sqrRootLength = ceiling(SquareRoot(Period))
else
sqrRootLength = floor(SquareRoot(Period));

Value1 = 2 * series(WMA(*Data, halvedLength));
Value2 = series(WMA(*Data, Period));
Value3 = series(WMA((Value1 - Value2), sqrRootLength));

HMA = Value3;
}