Download MetaTrader 5
To add comments, please log in or register
Sign up for MQL5.community to post your Forum topic
Robert Somerville
44
Robert Somerville 2014.09.02 09:13 

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:

indicator Wave_15_Min;

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");

begin

  line1 :=(C+O+L+H)/4-sma(C, period1);

  line2 :=(C+O+L+H)/4-sma(C, period2)-line1;

  line3:=(C+O+L+H)/4-sma(C, period3)-line1-line2;

  line4:=(C+O+L+H)/4-sma(C, period4)-line1-line2-line3;

 end. 

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.

Robert 

Simon Gniadkowski
Moderator
17963
Simon Gniadkowski 2014.09.02 10:54  
somercorp:

I would be very grateful if someone could assist me  . . . .

There are people here:  Freelance/Jobs   that will happily help you.
/
To add comments, please log in or register