how do i write for mt4...if 4hour candle close above an ma

 

how do i write:

if the 4 hour close of the candle closes above the the ma.

is there a way to specify the 4 hour candle part...becuase the ea will sit on a lower time frame

i just dont know if there is a way to code

4h(close(i))?

thanks

 
alanshore:

is there a way to specify the 4 hour candle part...becuase the ea will sit on a lower time frame

Yes there is a way...

alanshore:

i just dont know if there is a way to code

Google it. I did and found these one, two.

 

https://docs.mql4.com/series/iClose this is a directly way to get close value from the timeframe you wanna know

Think you have to take some time to read the Book and practise yourself

Now you are asking everything here without showing how you tried and without telling results you have

 
alanshore:
  1. how do i write:
  2. i just dont know if there is a way to code
  1. deVries: Now you are asking everything here without showing how you tried and without telling results you have
    Exacly.
  2. alanshore:
Reason: