Hello all,
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:
and within my EA, I want to get values of profit[] as well as its size ( ie. ArraySize(profit) ).
Any help is sincerely appreciated. :)
Just add required array to output buffers and retrieve this data as other data from indicators
Just add required array to output buffers and retrieve this data as other data from indicators
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.
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.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello all,
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:
and within my EA, I want to get values of profit[] as well as its size ( ie. ArraySize(profit) ).
Any help is sincerely appreciated. :)