- EA Buffers Not Getting Correct Values from Custom Indicator Buffer
- Reference to an Indicator
- Not able to update buffer values when creating an indicator in a loop mql5
As far as I know the Strategy Tester uses the same buffer size as the default bar count for charts as defined by the Options. So, maybe you can just reduce that bar count for Charts. I've never tried, so I cannot confirm this.
In my own coding, I try to not to depend on Indicators and instead transfer the calculations to the EA itself, and reduce them to incremental calculations, so as not to depend on any buffer at all. Obviously, this will depend on the type of indicators required.
As far as I know the Strategy Tester uses the same buffer size as the default bar count for charts as defined by the Options. So, maybe you can just reduce that bar count for Charts. I've never tried, so I cannot confirm this.
In my own coding, I try to not to depend on Indicators and instead transfer the calculations to the EA itself, and reduce them to incremental calculations, so as not to depend on any buffer at all. Obviously, this will depend on the type of indicators required.
Thanks. Yes, I have already done some of this. I am curious on another note, how resizing buffers can be done. I came across some threads where MQL5's built-in buffer resizing function didn't actually work as it should. For my information, is there a functional way that this can be done?
What exactly have you already done? It is unclear. From the rest of the post, it does not seem that you have changed the maximum number of bars for charts, which will indirectly set the maximum size of the buffers.
You cannot resize the Indicator buffers in code. All you can do is not use Indicators at all and do internal calculations instead.
What exactly have you already done? It is unclear. From the rest of the post, it does not seem that you have changed the maximum number of bars for charts, which will indirectly set the maximum size of the buffers.
You cannot resize the Indicator buffers in code. All you can do is not use Indicators at all and do internal calculations instead.
Sorry, I did both. Reduced the number of bars on chart and also transferred some indicator calculations to my EA. I haven't measured the memory usage before and after, I assume it can only have decreased, but I was just curious after reading this thread whether buffer resizing was a viable solution: https://www.mql5.com/en/forum/21639

- 2014.03.05
- www.mql5.com
That forum thread has nothing to do with Indicator buffers.
Unfortunately, due to lack of better naming abilities, MetaQuotes often refer to different things by the same name, which ends up confusing users.
So I will repeat, true Indicator buffers cannot be resized by code.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use