img

Parameters of custom indicators

The following group of functions is used to create custom indicators.

void SetDigits(int digits)

Setting the indicator precision. Used for displaying the numbers in a vertical axis.

void SetIndexCount(int count)

Setting the number of buffers for indicator values.

bool SetIndexBuffer(int index,double[]@ buffer)

Setting the buffer that is holding values of an indicator. The parameters are the buffer number and the reference to an array with the reverse indexing from the global script variables.

void SetIndexDrawStart(int index,int pos)

Setting the position from where the rendering of the indicator buffer starts. The parameters are the buffer number and the starting position.

void SetIndexEmptyValue(int index,double value)

Setting a void value for the indicator buffer. Void values are not engaged in the rendering of an indicator.

void SetIndexShift(int index,int shift)

Setting the shift of the indicator buffer rendering. The parameters are the buffer number and the shift.

void SetIndexStyle(int index,int type,int style,int width,color clr)

Setting the graphical properties of the indicator buffer rendering.

Parameters:

Properties of the Indicator object

  • int Calculated - number of counted bars of an indicator

Rendering a chart in a separate window

To display the chart in a separate window, the following preprocessor directive should be used:

 #set_indicator_separate 
Examples of indicators usage