Errors, bugs, questions - page 2493
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Where to dig?
Need to wait - cubicle is busy (data was not calculated at the time of contact)
Caught an error
...tested with error "critical runtime error 502 in OnTester function (array out of range, module ....ex5, file ....mqh, line 237, col 51...
Here is the code itself:
When i = 6,correcton_index7[i+2] (i+2=8) cannot well gobeyond the array's limits. All the more so because the previous loop didn't generate the same error. What am I missing?
Caught an error
Here is the code itself:
When i = 6,correcton_index7[i+2] (i+2=8) cannot well go beyond the array's limits. All the more so because the previous loop didn't generate the same error. What am I missing?
Incorrecton3[3]; you specify three items.
And the loop is called four times.
Incorrecton7[7]; you specify seven elements.
And run the loop eight times.
Incorrecton3[3]; you specify three elements.
And you run the loop four times.
Incorrecton7[7 ]; you specify seven elements.
And you execute the loop eight times.
Let's count on our fingers: i=0 and it is incremented by 1 with each loop. It works until i<7. The question for you (count on your fingers) is how many times the loop will be executed?
Can't be a problem here ?
You specify zero elements and assign a value there.
Yes, sorry, did not see that in the condition of the cycle does not =
Can't be a problem here ?
You specify zero elements and assign a value there.
Thanks for your willingness to help, but first, sort out the arrays yourself. )))
Thanks for your willingness to help, but start by sorting out the arrays yourself. )))
Array declaration and iteration over array elements are different )))
Array declaration and iteration over array elements are different ))