I would be very grateful if someone could assist me to convert the following custom indicator coded in CTL (Common Technical Analysis Language) to MQL4:
input C=close,O=open,H=high,L=low, period1 = 5,period2=20,period3=80,period4=480;
draw line1("15 Min"), line2("1 Hour"), line3("4 Hour"),line4("1 Day");
line1 :=(C+O+L+H)/4-sma(C, period1);
line2 :=(C+O+L+H)/4-sma(C, period2)-line1;
This code creates an indicator that draws 4 lines in a separate window representing simple moving averages of the price data but where the shorter period moving averages are subtracted from the longer period moving averages.
I am new to Metatrader and the MQL4 language and I just don't seem to be able to get my head around the syntax to be able to replicate this custom indicator.
I would be very grateful if someone could assist me . . . .
To add comments, please log in or register