I have a multiline separate indicator with 4 line graphs and I want to print the latest value from line index 2 from TDI indicator
I tried this
double buff; //buffer array
int h; //handle for icustom chart
h = iCustom(_Symbol,PERIOD_CURRENT,"TDI"); //indicator name
CopyBuffer(h,2,0,100,buff); //to copy 100 values from line index 2
Print("Sample..",buff); //To Print the latest value at bar0
There is no error from handler h
But CopyBuffer() throws error 4806 which says "the requested data was not found",
but it prints line index 0 values instead
I assumed that the second argument in copybuffer refers to line index 2 from which im copying values.
I also tried mq4 style to copy from line 2
h = iCustom(_Symbol,PERIOD_CURRENT,"TDI", 2, 0);
which cannot load the custom chart handler (throws error).
So in MQL5 how do I specify line index 2 from custom chart?
Please enable the necessary setting in your browser, otherwise you will not be able to log in.