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
BTW (little bit off topic), is there any size limitation for arrays? This code prints out 0.
You're trying to allocate more than the 2GB limit for a 32-bit application.
I would never have found it out. Thanks!
Have you any idea how is it possible to check it within the program to avoid errors?
(Any other way than if(arraysize(array)!=0) ...)
I would never have found it out. Thanks!
Have you any idea how is it possible to check it within the program to avoid errors?
(Any other way than if(arraysize(array)!=0) ...)
ArrayResize() returns -1 if it fails. The amount of memory you can allocate is going to depend not only on the amount of free memory on the computer, capped by the 2GB limit for 32-bit applications, but also, within free memory, by the largest contiguous block which Windows is able to allocate. That, in turn, is going to depend on the details of exactly how MT4 goes about requesting the memory from Windows.
Fundamentally, you're never going to get anywhere close to creating an array with a billion (1,234,567,890) entries.
ArrayResize() returns -1 if it fails. The amount of memory you can allocate is going to depend not only on the amount of free memory on the computer, capped by the 2GB limit for 32-bit applications, but also, within free memory, by the largest contiguous block which Windows is able to allocate. That, in turn, is going to depend on the details of exactly how MT4 goes about requesting the memory from Windows.
Fundamentally, you're never going to get anywhere close to creating an array with a billion (1,234,567,890) entries.
Of course it does.
4025
ERR_OUT_OF_MEMORY
Out of memory
but maximum RAM is 3 GB on the 32 bit version