If i want to look for 200 days and 5 days moving average

 
MA200 = iMA(NULL, 1440, 200, 8,MODE_SMA,PRICE_CLOSE, 1);

   MA5 = iMA(NULL, 1440, 5, 8,MODE_SMA,PRICE_CLOSE, 1);

 

 

1440 sets the timeframe to 1Day, and 200 and 5 each represents the days for calculating moving average

am i doing this right? 

 
Yes. This would work for you. But this would give you the Moving Averages with an offset of 8. (https://docs.mql4.com/indicators/ima)
 

Klik on this link     Why does my EA keeps giving negative profit when back testing?         

and read there    this  posting from 

Moderator
7423
RaptorUK 2013.01.30 13:23

 

Klik also there in the links   of that posts iMA()  and iRSI()  will be explained

 
Master.Aurora:
Yes. This would work for you. But this would give you the Moving Averages with an offset of 8. (https://docs.mql4.com/indicators/ima)

i dun understand the bolded part. would you please explain in detail?
 

There is nothing to explain in detail or not. ANSWER the question: Why are YOU using a MA with an offset of 8?

If you do not understand what an offset is, then RTFM.

 




200SMAMA200 

 

iMA(NULL=the currency pair that you dropped the Moving average on,

1440= 1 Day(1440Minutes),

Note how the 200,8,simple,close are entered in the same order as  they appear in the form. 

200=Number of bars considered,

8= How much you want the Moving average shifted on your chart,(Change to Zero to make it a normal non-shifted Ma)

MODE_SMA=Simple Moving Average,

PRICE_CLOSE=Calculated from the close of the last 200 candles,

1=Calculated from the last completed candle back 200 candles.);(the one being drawn at the moment is candle 0)

 

Reason: