Quote:
Originally Posted by mikeschra
iCustom(NULL,0,"N4 TF Has Bar",MaMetod,MaPeriod,MaMetod2,MaPeriod2,BarWidth, BarColorUp,BarColorDown,TextColor,MaxBars,HasBarPe riod,1);
What value does this code return?
|
The iCustom(..) function returns the value of an entry in a buffer of the indicator. The last two arguments tell buffer number and index into that buffer.
So it is: iCustom(..., BufferNumber, Index )
You have to refer to the indicator code to know which buffer to read off. Usually you can see this by opening the Data Window (with the indicator attached), and then count from 0. I.e., buffer number 0 refers to the first
indicator buffer, 1 to the second etc.
Then you tell which Indexm i.e. for which bar into the past to get the value. Index 0 is the currently building bar, Index 1 the most recently completed bar, etc.