David Jumbo:
Please I am working on MQL5 and I see Array out of range.
I have tried +1 but it still does not work. What else can I change to make it work?
Because your i ranges from 0 to limit-1, you end up accessing MA[-3], MA[-2] and MA[-1] - all of which will give you Array out of range error.
You'll also have to make sure that your 5000 and total-50 are less than or equal to limit (anyway, try to avoid hard-coding numbers other than the common -1.).
Thanks for the pointers.
Error now resolved.
:)

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
Please I am working on MQL5 and I see Array out of range.
I have tried +1 but it still does not work. What else can I change to make it work?
THANK YOU