iMA sometimes Return "0". Someone coul'd help me?

 
Hello to all,
I have a problem with iMA function for calculating the moving average. The function almost always returns the correct value but in some cases of some currencies returns to ZERO.
I am making a simple calculation of the moving average of 200 periods
eg. SMA200 = iMA (Symbol iTFMinute, 200, MovingShift, MODE_SMA, PRICE_CLOSE, 0);
I also checked GetLastError () but returns "0".
In many cases, however, when it does not work MODE_SMA almost always works MODE_EMA, but i need SMA value :(
I do not understand why. You can help me?
Thank you so much ... I'm really going crazy
 
You don't have 200 bars in that TF.
 
William Roeder:
You don't have 200 bars in that TF.

i met the same problem in SMA mode.

if i open all charts of symbols and timeframe in mt4 software, can it be resolved?

thank you

 
long_a17: if i open all charts of symbols and timeframe in mt4 software, can it be resolved?

Unnecessary: On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values.
          Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26 № 4

Reason: