Custom Indicator Buffers

 

Created my own custom indicator - functionX.mqh and it works fine on EA but when I tried to graph it using indicator buffers, there is no graphs. Are there any limitations to how complex functionX can be because when functionX is written as

double functionX(int i)

{

return(High[i]);

}

it works. Thanks

//************* THIS DOES NOT WORK ****************

#include <functionX.mqh>

int start()

{

.....

while(i>=0)

{

.....

QuantilesBuffer[i] = functionX(i);
i--;

}

}