You have a bug in ArrayFill function. Third param is number of elements to fill so this should be 1 in this case:
ArrayFill(UpGrid,i,1,vUG); ArrayFill(DownGrid,i,1,vDG);
Normal way also should works properly:
UpGrid[i] = vUG; DownGrid[i] = vDG;
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
Hi,
today I started my first project in MQL5 and right at the beginning I'm very frustrated, yet.
I wanted to draw some lines at prices from an array. I never had problems with arrays, but in MQL5 I don't get it working.
For any reason I get the error message "array out of range" and the EA will get removed. Where is my mistake? :/
At the top:
And the function:
I also tried the normal way 'UpGrid[i] = value;' instead of ArrayFill, but that also won't work.
Would be very happy if anyone could solve the problem.