I am trying to access buffers 1 and 2 from the ZigZag Indicator via an indicator I am developing which uses the values stored in those two buffers. I have been using the CopyBuffer function passing as the second parameter the ordinal of the buffer I want to access. I realize when I use 1 or 2 it does not work, i.e. CopyBuffer returns -1, however if I use the ordinal 0 (which I do not need) CopyBuffer returns a result.
Are there any examples of indicators done that I could reference or does anyone know why would this be?
I think your problem is probably because the second and third indicator buffers in the zigzag code are of type "INDICATOR_CALCULATIONS". Suggest changing them to "INDICATOR_DATA", altough that may not be the only change you have to do