Indeed! Thank you Alain!
Using your code piece, the increase in indicator count was much slower, but the overall memory consumption was much higher (from under 800MB, now the memory consumption went up to 2.5GB!).This time, I did get a Windows warning of memory over-consumption.
Is there a limitation on the number of indicators which can be loaded onto a Symbol or accessed within a Script? Short answer: No.Long answer: Depends on how much available memory you have.
I'm now wondering whether my PC is making full use of my 16GB RAM, since it starts panicking at close to 8GB of mem.consumption. Perhaps the other 8GB are not being used..I'll update this post with more info if I find anything MT5\MQL5 related.
Maybe you could open a ticket to ServiceDesk ? Seems to me a lot of memory used for an handle.
Seems to me a lot of memory used for an handle.
I'm using up to 20MB per "Custom Moving Average" indicator, which I don't think it's much taking into account I'm analyzing M5 rates since 2000..!
A note I'd like to share:I noticed that performance and memory efficiency greatly increases when you use iMA() instead of the respective iCustom() version. The same applies to the other native iINDICATORS.I believe MetaQuotes has prioritized and optimized their native indicators to be really efficient. Something to take into account if you're running resource-intensive calculations.
Around 72,000 bars per year. 1,152,000 bars for 16 years. 1 buffer of double gives 9.2MB
I am still wondering why it needs 20 MB.
I'll redo the script so you can see hahahaha - I'm laughing cos the result is hilarious. "Examples\Custom Moving Average.mq5" is so inefficient.
Here you go:
You're most welcome!
I'll report it to ServiceDesk.
Also, once again, thank you for your guidance Alain! :)