Errors, bugs, questions - page 1623

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
Thank you very much for the solution provided. Everything works.
It would be much faster to read the entire array file into memory, and then work with it.
How do I connect an array file to my EA?
First, the script writes an array:
I connect the file in the EA:
When compiling, errors:
'??????????????????????????t????...' - identifier is too long mas.dat 1 1
'' - unknown symbol mas.dat 1 3015
Serious bugs with static variables. Consider this code:
When executing it, we get the following order of alerts:
B
a.m==0
&a==0
A
That is, the static variable hasn't been initialized yet by the moment of accessing it. Even the pointer is null. It was just skipped and we safely move on.
Either initialize the variable and go further or abort the compilation with an error.
But when recursion of mutually referenced classes occurs, the compilation should be aborted.
How do I connect an array file to my EA?
First, the script writes an array:
I connect the file in the EA:
When compiling, errors:
'??????????????????????????t????...' - identifier is too long mas.dat 1 1
'' - unknown symbol mas.dat 1 3015
Your script should generate a file mas.mqh, which will contain an array of uchar-types containing bytes of your data. For example, if the file is three bytes in size, the contents of the mas.mqh file should be as follows:
The generated array mass is what you should use in your program.
I don't think the optimizer will have to open-read-close the file tens of thousands of times.
In debug mode on historical data, MQLInfoInteger(MQL_VISUAL_MODE) always returns true.