please help in movingaverage

 

hi thanks for all who can help me

i want to write a code that call many moving average when they cross they give me signal to buy or sell

 

really i made the code but i have a problem that i want to call moving average in the h1 time frame or h4 but the expert isn't working according to this

 example double  MA1=iMA(NULL,60,200,0,MODE_SMA,PRICE_CLOSE,0); 

 

the ma1 value isn't correct like areal chart in h1 chart

how can i have the correct value of it cause i want to run my ea in 1m chart....

thanks at all 

 
That is already correct. Try to debug 'em and watch the value.
 
Irwan Adnan:
That is already correct. Try to debug 'em and watch the value.

yes it's value is wrong

try it with rsi or other indicator let make acomment with it's double on the chart and show it u will be surprise like me ...

 

any suggestion???

 


 
abdallah alraie:

I am surprised if you got different value. The below is value of MA1=iMA(NULL,60,200,0,MODE_SMA,PRICE_CLOSE,0); in each timeframe.

 

 
Abdullah Alrai :


Always clarify: you are asking about MQL4 or MQ5. It is very important.

 
Abdullah Alrai:

hi thanks for all who can help me

i want to write a code that call many moving average when they cross they give me signal to buy or sell

 

really i made the code but i have a problem that i want to call moving average in the h1 time frame or h4 but the expert isn't working according to this

 example double  MA1=iMA(NULL,60,200,0,MODE_SMA,PRICE_CLOSE,0); 

 

the ma1 value isn't correct like areal chart in h1 chart

how can i have the correct value of it cause i want to run my ea in 1m chart....

thanks at all 

Risk a look at the MACD. It is about a cross of two MA. You find it already on your PC in ..\Experts\Examples\MACD\

 
Carl Schreiber #:

Risk a look at the MACD. It is about a cross of two MA. You find it already on your PC in ..\Experts\Examples\MACD\

Oh thanks for all who share his efforts in this old post.... It was old and that was one of easiest thing that i can do now ... And i make many complicated products after that time ... Thanks for all helpers... 
Reason: