I have a problem.
I want to put in my EA as Stop the last bottom, or the previous one, or the same for the top.
But when I run the EA, it gives the error "array out of range".
what am I doing wrong?
which line does it report the error on
where is your definition of the array
you need to post all the relevent code
I have a problem.
I want to put in my EA as Stop the last bottom, or the previous one, or the same for the top.
But when I run the EA, it gives the error "array out of range".
what am I doing wrong?
Hi, you use array candle. But at your code I dont see where you create this arrray and its size.
How many rates are getting returned in the copy
What is the value of i when it errors.
500 rates = 0 to 499 not 500
your loop of 3-500 means 500+4 = 504 if you have only copied 500 then it would fail. so your loop should be 499-4 = 495
I have a problem.
I want to put in my EA as Stop the last bottom, or the previous one, or the same for the top.
But when I run the EA, it gives the error "array out of range".
what am I doing wrong?
If i =13 candle corresponding to yesterday date, i+1(would be 14 corresponding to 2 days ago) and (i-1) would be corresponding to today's date, you are getting out of range because (i-2) which is suppose to be tomorrow's date is not yet having a candle.
Check that 500 is not greater than the (total number of bars -4 && START+2) in the TF, you are looking at
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have a problem.
I want to put in my EA as Stop the last bottom, or the previous one, or the same for the top.
But when I run the EA, it gives the error "array out of range".
what am I doing wrong?