Could someone please take this Hull Moving Avg code that is out of TradeStation and rewrite it so that it functions for MT4?

----------------

inputs:
double Price( Close ), price chain to use in the calculation of this HMA
int Length( 9 ), variety of pubs to use in calculation of the HMA
int Displace( 0 ), variety of pubs to reestablish the plot of this HMA; adverse
worth of the input displace the plot to the correct, positive values displace
the plot to the left
int BackgroundColorAlertCell( DarkGray ); if awake standards are met, this can be
the colour used for the mobile background in RadarScreen; when it Isn't desired
for the mobile background color to change when the alert criteria are met, set
this input into the default mobile background color

variables:
dual HullAvg( 0 );

HullAvg = HMA( Price, Length );
Plot1[Displace]( HullAvg, HMA );
alert standards
should Displace = 0 then
begin
if Price crosses over HullAvg then
begin
Alert( Price crossing over Hull moderate );
SetPlotBGColor( 1, BackgroundColorAlertCell );
finish
else should Price crosses under HullAvg then
begin
Alert( Price crossing under Hull average );
SetPlotBGColor( 1, BackgroundColorAlertCell );
end;
end;