Skip to main content
Version: v24

IPineSeries

Interface

Methods

get

Get the value at a specific index.

Note: The indices of a pine series is opposite.

Example:

  • s.get(1) returns second last,
  • s.get(2) - third last
  • and so on

Signature

get(n?: number) => number

Parameters

NameType
n?number

Returns

number


indexOf

Get the index for the bar at the specified timestamp

Signature

indexOf(time: number) => number

Parameters

NameTypeDescription
timenumbertimestamp

Returns

number


set

Set the value for the pine series at the current index interation.

Signature

set(value: number) => void

Parameters

NameTypeDescription
valuenumbervalue to be set

Returns

void