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
The answer has been given.
Sorry but how exactly?
I've also met those kind of ram weakness, but in my case it was about calculation on about 30 pairs - I've found a way thru, so obviously there's a solution to your problem. A fact being we don't know what your routine looks like.
Just in case here's some track you could look for :
While I believe that i can see your problem: eg ArrayResize, AND I agree with your assumption that it is the issue, AND I think it is obvious that you need to recode it so that you either do not use it, OR you devide your tool into more than 1 indicator or ea; I am 100% with Mladen: if you can not or will not post the code, everything we suggest can only be guesswork, and most probable that most of our suggestions will have nothing to do with the issue. I am also assuming this from your responses that this has already occured a few times. If you can not post the code in SRC, then, at least attach it as a file.
I am sure that you may have issue with posting your code either way, but if you want special assistance, as your problem obviously requires, then, you need to post your code, OR pay someone and sign a NDD with that coder.
By "recoding" I did mean like Icham has suggested in his post: Use arrays to store the result only.
To reduce CPU, you can limit the bars calculated. Or reduce Max bars in chart to something reasonable like 1K. Or, as a last resort, use my segmented OnCalculate include file.
Your indicator is too slow... - Indices - MQL4 programming forum #1 № 6
All buffers are sized to the number of bars on the chart. Reduce reduce Tools → Options (control-O) → Charts → Max bars in chart to something reasonable (like 1K.)
Using arrays verses buffers will make no difference to RAM, unless your arrays are only accessed circularly, thus limiting them to small sizes.
I've also met those kind of ram weakness, but in my case it was about calculation on about 30 pairs - I've found a way thru, so obviously there's a solution to your problem. A fact being we don't know what your routine looks like.
Just in case here's some track you could look for :
Yes it seems that there is no escape. I don't know why the ArrayFree or ArrayResize doesn't free the memory, so as you said, I need to get throgh the code and trying to optimze it. Thanks..
While I believe that i can see your problem: eg ArrayResize, AND I agree with your assumption that it is the issue, AND I think it is obvious that you need to recode it so that you either do not use it, OR you devide your tool into more than 1 indicator or ea; I am 100% with Mladen: if you can not or will not post the code, everything we suggest can only be guesswork, and most probable that most of our suggestions will have nothing to do with the issue. I am also assuming this from your responses that this has already occured a few times. If you can not post the code in SRC, then, at least attach it as a file.
I am sure that you may have issue with posting your code either way, but if you want special assistance, as your problem obviously requires, then, you need to post your code, OR pay someone and sign a NDD with that coder.
By "recoding" I did mean like Icham has suggested in his post: Use arrays to store the result only.
I will try to write a short example code that can display the problem (I need some time for that..)
To reduce CPU, you can limit the bars calculated. Or reduce Max bars in chart to something reasonable like 1K. Or, as a last resort, use my segmented OnCalculate include file.
Your indicator is too slow... - Indices - MQL4 programming forum #1 № 6
All buffers are sized to the number of bars on the chart. Reduce reduce Tools → Options (control-O) → Charts → Max bars in chart to something reasonable (like 1K.)
Using arrays verses buffers will make no difference to RAM, unless your arrays are only accessed circularly, thus limiting them to small sizes.
Will try. Thanks..
The soluction:
ArrayResize dosen't free the memory to the system. Its just chance the accessible size.
To free the memory to other aplications, need to use ArrayFree.
Keep in mind that ArrayResize is faster if you need to use the memory again after because the memory continue to be reserved to the array.