Hi, I am getting critical error ''Array out of range" in iBarshift function. I am trying to create an EA based on breakout but iBarshift function throwing error at Time[pos] field. Please check the code..regards.
- Questions from Beginners MQL5 MT5 MetaTrader 5
- Array out of range
- Array out of range error
You don't show how you set the values of counted_bars or start. Can't help if you don't give the information. Try adding a print statement for some debugging.
The out of range means the number you are trying to index is not found. recheck the value of 'limit'
Topics concerning MT4 and MQL4 have their own section.
In future please post in the correct section.
I have moved your topic to the MQL4 and Metatrader 4 section.

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