Download MetaTrader 5

Unknown Runtime Error (Build 264)

To add comments, please log in or register
Are you accustomed to using the standard library? MQL5 has one!
Andrei Moraru
1160
Andrei Moraru 2010.04.20 13:34 

I am getting an unknown runtime error after the execution reaches some point inside OnCalculate() function. What could be the reason?

Please, see the attached mq5 file.

Documentation on MQL5: Language Basics / Functions / Event Handling Functions
  • www.mql5.com
Language Basics / Functions / Event Handling Functions - Documentation on MQL5
Files:
bb_macd.mq5 7 kb
Ilyas
1206
Ilyas 2010.04.20 15:35  

Thank you for message. Bug fixed. Please wait for updates.

Instead of an 'unknown error' should be 'Array out of range'

Check your code in line 155 ( dTmp += MathPow(price[position - i] - ExtMapBuffer5[position], 2); )

position-i can be negative


To add comments, please log in or register