I want to access data arrays of my custom indicator and write these data to a file for analysis.
The data array in the custom indicator is like:
//--- indicator buffers
and within my EA, I want to get values of profit as well as its size ( ie. ArraySize(profit) ).
Any help is sincerely appreciated. :)
Thanks for you kindly reply!
Although I'm not sure if I get your idea correctly, but I think you meant it should be done like this:
1. SetIndexBuffer() to set the array as an index buffer
2. SetIndexStyle() as DRAW_NONE
3.access its value with iCustom
the catch is: I don't know the array size, and I can't determine the start & end point of the data series that will be saved to file.
New approach in MQL5:
1. get the handle of the custom indicator (using iCustom())
2. get the indicator value using CopyBuffer();
I might want to use ArraySetAsSeries() to set the destination buffer of CopyBuffer as "time series", this way I can access the buffer the same way I access the System defined indicators.