Hi,
I am trying start me EA but it's drop error Array out of range in the below rows on some pairs:
{
if((High[j]==highBar || Low[j]==highBar) && TrendSHORT)
barsQuantity set as 3000 as extern variable:
p.s. if I set barsQuantity as 2000 - the problem dissappears.
I am some new in mql4 and tried find in the answer. Please help!
It sounds like you have between 2000 and 3000 bars on the chart.
If you try to access the index of a bar that doesn't exist, you will get that error. Have a look for Bars and/or rates_total
It sounds like you have between 2000 and 3000 bars on the chart.
If you try to access the index of a bar that doesn't exist, you will get that error. Have a look for Bars and/or rates_total
Yes, you was right. Thank you! After downloading from history center the problem disappears.
How can I add some check to avoid this error?
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I am trying start me EA but it's drop error Array out of range in the below rows on some pairs:
{
if((High[j]==highBar || Low[j]==highBar) && TrendSHORT)
barsQuantity set as 3000 as extern variable:
p.s. if I set barsQuantity as 2000 - the problem dissappears.
I am some new in mql4 and tried find in the answer. Please help!