Is it possible to reference an array that has already been initialized in an indicator. Something similar to the iCustom function, perhaps passing the window index, indicator name and buffer /array index.
I have an indicator that creates 6 buffers/arrays. I then have a couple of other indicators that run duplicated code to produce perhaps 2 or 3 of these same buffers. Everything is working fine but I am finding it can be costly in performance, the details of which I won’t go into at present.
If I understand it correctly, iCustom, with its parameters, actually runs the code ( in its own thread) to produce the desired return value, which is great but not what I need if my primary concern at the moment is performance.
What I am after is the ability to reference a particular array of an indicator that is ALREADY initialized. In this case the referencing would be from a different indicator mounted in the same window. But it would be handy if it could be referenced from elsewhere as I have other indicators in separate sub windows that again duplicate code to produce 1 or 2 of the base indicator's buffers.
I have read through a bunch of articles but not finding what I need. I don’t think it’s possible as surely this would be a well documented strategy for partially overcoming the 8 buffer limit on each indicator. (Why do they have that ?)
Hmmm…. Or am I answering my own question here… is the solution to redesign my indicators to utilize a series of iCustom calls…. Hmnmmmm….. complicated and probably beyond my novice programming skills.
Any thoughts/tips or a decisive “NO… it can’t be done” would be greatly appreciated. Sorry if this question has been addressed before and/or displays my ignorance of MQL.
Many thanks in advance to any replies.
I have an indicator that creates 6 buffers/arrays. I then have a couple of other indicators that run duplicated code to produce perhaps 2 or 3 of these same buffers. Everything is working fine but I am finding it can be costly in performance, the details of which I won’t go into at present.
If I understand it correctly, iCustom, with its parameters, actually runs the code ( in its own thread) to produce the desired return value, which is great but not what I need if my primary concern at the moment is performance.
What I am after is the ability to reference a particular array of an indicator that is ALREADY initialized. In this case the referencing would be from a different indicator mounted in the same window. But it would be handy if it could be referenced from elsewhere as I have other indicators in separate sub windows that again duplicate code to produce 1 or 2 of the base indicator's buffers.
I have read through a bunch of articles but not finding what I need. I don’t think it’s possible as surely this would be a well documented strategy for partially overcoming the 8 buffer limit on each indicator. (Why do they have that ?)
Hmmm…. Or am I answering my own question here… is the solution to redesign my indicators to utilize a series of iCustom calls…. Hmnmmmm….. complicated and probably beyond my novice programming skills.
Any thoughts/tips or a decisive “NO… it can’t be done” would be greatly appreciated. Sorry if this question has been addressed before and/or displays my ignorance of MQL.
Many thanks in advance to any replies.