Hi
Can somebody please tell me why am i getting error in this code?
The errors i am getting are
Ln 6 error 31 syntax error unexpected FUN,epecting identifier
Ln 9 error 32 syntax error, unexpected "}". Is there semicolan missing at the end of previous line?
Can somebody please tell me why am i getting error in this code?
Code:
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);
The errors i am getting are
Ln 6 error 31 syntax error unexpected FUN,epecting identifier
Ln 9 error 32 syntax error, unexpected "}". Is there semicolan missing at the end of previous line?