Errors, bugs, questions - page 1088
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
After recompiling the indicator, the "array out of range" error started to occur when working with dynamic arrays.
It didn't occur before. What to do?
If you have similar lines in the beginning of the file
#include <File.mqh> , these include files have most likely been changed since your previous compilation, by you or by someone else
If you have similar lines at the beginning of your file
#include <File.mqh>, it is likely that these include files were changed since your last compilation, by you or by someone else.
There are no include files.
There are no plug-in files.
Why would an"array out of range" error even occur when trying to put something into a dynamic array? It is a dynamic array.
Array B1[] Set as the corresponding indicator buffer
SetIndexBuffer(0,B1,INDICATOR_DATA); ArraySetAsSeries(B1,true);
The size of the array is clearly not user-controlled here.
Why would an"array out of range" error even occur when trying to put something into a dynamic array? It's a dynamic array.
Why would an"array out of range" error even occur when trying to put something into a dynamic array? It's dynamic.
(fcplm)
Who's going to put him away?! He's a monument!
Platform error.
If when filling the B1 array of the indicator buffer the procedure SetIndexBuffer(0,B1,INDICATOR_DATA) is called repeatedly,
e.g., when initializing the indicator, the next attempt to write something in the B1 array causes the"array out of range" error.
When calling the SetIndexBuffer(0,B1,INDICATOR_DATA) procedure once, everything works fine.
There was no such thing before.
Platform error.
If when filling the B1 array of the indicator buffer the procedure SetIndexBuffer(0,B1,INDICATOR_DATA) is called repeatedly,
e.g., when initializing the indicator, the next attempt to write something in the B1 array causes the"array out of range" error.
When a single call of the procedure SetIndexBuffer(0,B1,INDICATOR_DATA) occurs, everything works fine.
It didn't happen before.
Why are you doing this repeatedly?
Binding a buffer means clearing it and preparing it for dynamic binding for subsequent calculations. If you call it a second time, the previous buffer will be cleared and will be filled only at the next call of the indicator recalculation.
Why are you doing this repeatedly?
Binding of the buffer means its clearing and preparation for dynamic binding for the next calculations. If you call it a second time, the previous buffer will be cleared and will be filled only at the next call of the indicator recalculation.
This was the standard full initialization of the indicator, which takes place when the indicator is first started and is done via Oninit().
Sometimes, when you update the history, etc., it also needs to be done.
No one ever thought that the repeated initialization of the indicator via Oninit() would cause the arrays to stop responding.