CreateIndexBufferWithArgs

Creates a new buffer with specified display properties.

Syntax

CreateIndexBufferWithArgs(
    index: number,
    aLabel: string,
    drawStyle: TDrawStyle,
    style: TPenStyle,
    width: number,
    color: string
): TIndexBuffer

Parameters

  • index - A number representing the buffer index.

  • aLabel - A string containing the label for the buffer.

  • drawStyle - A value from the TDrawStyle enum specifying how to draw the buffer.

  • style - A value from the TPenStyle enum specifying the line style.

  • width - A number representing the line width in pixels.

  • color - A string hex color value for the buffer.

Return Value

Returns a TIndexBuffer object that can be used to store indicator values.

Description

The CreateIndexBufferWithArgs method creates a new buffer with specified display properties and assigns it to the given index. This is a convenient way to create and configure a buffer in a single call.

Example

Last updated