View Single Post
  #3 (permalink)  
Old 08-15-2007, 02:02 AM
ralph.ronnquist's Avatar
ralph.ronnquist ralph.ronnquist is offline
Senior Member
 
Join Date: Oct 2006
Posts: 297
ralph.ronnquist is on a distinguished road
Quote:
Originally Posted by mikeschra View Post
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.
Reply With Quote