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
- IMA indicator value of 10
- Sometimes zero value from iMA when running 32 EA on virtual server
- Need help for a simple function
You don't have 200 bars in that TF.
William Roeder:
You don't have 200 bars in that TF.
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

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register