Lumen ChartsLumen Charts
Api

PineJSStd

Download Markdown

Integration guide ยท Reference index

Public contract reference. This declaration describes types and callback shapes; availability is constrained by the linked integration guide and the runtime capability. Legacy product-specific fields are not a promise of implementation.

max_series_default_size

max_series_default_size: 10001;

Use the type signature above and the integration guide for the owning capability.

eps

eps(): number;

Use the type signature above and the integration guide for the owning capability.

high

high(context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

low

low(context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

open

open(context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

close

close(context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

ohlc4

ohlc4(context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

volume

volume(context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

time

time(context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

time (overload 2)

time(context: IContext, period: string, spec: unknown): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes
periodstringYes
specunknownYes

hl2

hl2(context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

hlc3

hlc3(context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

period

period(context: IContext): string;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

tickerid

tickerid(context: IContext): string;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

year

year(context: IContext, time?: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes
timenumberNo

month

month(context: IContext, time?: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes
timenumberNo

weekofyear

weekofyear(context: IContext, time?: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes
timenumberNo

dayofmonth

dayofmonth(context: IContext, time?: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes
timenumberNo

dayofweek

dayofweek(context: IContext, time?: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes
timenumberNo

hour

hour(context: IContext, time?: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes
timenumberNo

minute

minute(context: IContext, time?: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes
timenumberNo

second

second(context: IContext, time?: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes
timenumberNo

greaterOrEqual

greaterOrEqual(n1: number, n2: number, eps?: number): boolean;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n1numberYes
n2numberYes
epsnumberNo

lessOrEqual

lessOrEqual(n1: number, n2: number, eps?: number): boolean;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n1numberYes
n2numberYes
epsnumberNo

equal

equal(n1: number, n2: number, eps?: number): boolean;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n1numberYes
n2numberYes
epsnumberNo

greater

greater(n1: number, n2: number, eps?: number): boolean;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n1numberYes
n2numberYes
epsnumberNo

less

less(n1: number, n2: number, eps?: number): boolean;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n1numberYes
n2numberYes
epsnumberNo

compare

compare(n1: number, n2: number, eps?: number): -1 | 0 | 1;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n1numberYes
n2numberYes
epsnumberNo

ge

ge(n1: number, n2: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n1numberYes
n2numberYes

le

le(n1: number, n2: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n1numberYes
n2numberYes

eq

eq(n1: number, n2: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n1numberYes
n2numberYes

neq

neq(n1: number, n2: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n1numberYes
n2numberYes

gt

gt(n1: number, n2: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n1numberYes
n2numberYes

lt

lt(n1: number, n2: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n1numberYes
n2numberYes

iff

iff(condition: number, thenValue: number, elseValue: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
conditionnumberYes
thenValuenumberYes
elseValuenumberYes

tr

tr(n_handleNaN: number | undefined, ctx: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n_handleNaNnumber | undefinedYes
ctxIContextYes

atr

atr(length: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
lengthnumberYes
contextIContextYes

isdwm

isdwm(context: IContext): boolean;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

isintraday

isintraday(context: IContext): boolean;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

isdaily

isdaily(context: IContext): boolean;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

isweekly

isweekly(context: IContext): boolean;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

ismonthly

ismonthly(context: IContext): boolean;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

selectSessionBreaks

selectSessionBreaks(context: IContext, times: number[]): number[];

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes
timesnumber[]Yes

createNewSessionCheck

createNewSessionCheck(context: IContext): (time: number) => boolean;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

error

error(message: string): never;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
messagestringYes

zigzag

zigzag(n_deviation: number, n_depth: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n_deviationnumberYes
n_depthnumberYes
contextIContextYes

zigzagbars

zigzagbars(n_deviation: number, n_depth: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n_deviationnumberYes
n_depthnumberYes
contextIContextYes

updatetime

updatetime(context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

ticker

ticker(context: IContext): string;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

percentrank

percentrank(source: IPineSeries, length: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
lengthnumberYes

rising

rising(series: IPineSeries, length: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
seriesIPineSeriesYes
lengthnumberYes

falling

falling(series: IPineSeries, length: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
seriesIPineSeriesYes
lengthnumberYes

rsi

rsi(upper: number, lower: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
uppernumberYes
lowernumberYes

sum

sum(source: IPineSeries, length: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
lengthnumberYes
contextIContextYes

sma

sma(source: IPineSeries, length: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
lengthnumberYes
contextIContextYes

smma

smma(n_value: number, n_length: number, ctx: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n_valuenumberYes
n_lengthnumberYes
ctxIContextYes

rma

rma(source: IPineSeries, length: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
lengthnumberYes
contextIContextYes

ema

ema(source: IPineSeries, length: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
lengthnumberYes
contextIContextYes

wma

wma(source: IPineSeries, length: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
lengthnumberYes
contextIContextYes

vwma

vwma(source: IPineSeries, length: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
lengthnumberYes
contextIContextYes

swma

swma(source: IPineSeries, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
contextIContextYes

fixnan

fixnan(n_current: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n_currentnumberYes
contextIContextYes

lowestbars

lowestbars(source: IPineSeries, length: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
lengthnumberYes
contextIContextYes

lowest

lowest(source: IPineSeries, length: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
lengthnumberYes
contextIContextYes

highestbars

highestbars(source: IPineSeries, length: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
lengthnumberYes
contextIContextYes

highest

highest(source: IPineSeries, length: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
lengthnumberYes
contextIContextYes

cum

cum(n_value: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n_valuenumberYes
contextIContextYes

accdist

accdist(context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

correlation

correlation(
    sourceA: IPineSeries,
    sourceB: IPineSeries,
    length: number,
    context: IContext,
  ): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceAIPineSeriesYes
sourceBIPineSeriesYes
lengthnumberYes
contextIContextYes

stoch

stoch(
    source: IPineSeries,
    high: IPineSeries,
    low: IPineSeries,
    length: number,
    context: IContext,
  ): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
highIPineSeriesYes
lowIPineSeriesYes
lengthnumberYes
contextIContextYes

tsi

tsi(
    source: IPineSeries,
    shortLength: number,
    longLength: number,
    context: IContext,
  ): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
shortLengthnumberYes
longLengthnumberYes
contextIContextYes

cross

cross(n_0: number, n_1: number, context: IContext): boolean;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n_0numberYes
n_1numberYes
contextIContextYes

linreg

linreg(source: IPineSeries, length: number, offset: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
lengthnumberYes
offsetnumberYes

sar

sar(start: number, inc: number, max: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
startnumberYes
incnumberYes
maxnumberYes
contextIContextYes

alma

alma(
    series: IPineSeries,
    length: number,
    offset: number,
    sigma: number,
  ): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
seriesIPineSeriesYes
lengthnumberYes
offsetnumberYes
sigmanumberYes

change

change(source: IPineSeries): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes

roc

roc(source: IPineSeries, length: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
lengthnumberYes

dev

dev(source: IPineSeries, length: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
lengthnumberYes
contextIContextYes

stdev

stdev(source: IPineSeries, length: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
lengthnumberYes
contextIContextYes

variance

variance(source: IPineSeries, length: number, context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
sourceIPineSeriesYes
lengthnumberYes
contextIContextYes

add_days_considering_dst

add_days_considering_dst(
    timezone: string,
    utcTime: Date,
    daysCount: number,
  ): Date;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
timezonestringYes
utcTimeDateYes
daysCountnumberYes

add_years_considering_dst

add_years_considering_dst(
    timezone: string,
    utcTime: Date,
    yearsCount: number,
  ): Date;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
timezonestringYes
utcTimeDateYes
yearsCountnumberYes

dmi

dmi(
    diLength: number,
    adxSmoothingLength: number,
    context: IContext,
  ): [number, number, number, number, number];

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
diLengthnumberYes
adxSmoothingLengthnumberYes
contextIContextYes

na

na(n?: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
nnumberNo

nz

nz(x: number, y?: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
xnumberYes
ynumberNo

and

and(n_0: number, n_1: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n_0numberYes
n_1numberYes

or

or(n_0: number, n_1: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n_0numberYes
n_1numberYes

not

not(n_0: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
n_0numberYes

max

max(...values: number[]): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
valuesnumber[]Yes

min

min(...values: number[]): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
valuesnumber[]Yes

pow

pow(base: number, exponent: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
basenumberYes
exponentnumberYes

abs

abs(x: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
xnumberYes

log

log(x: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
xnumberYes

log10

log10(x: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
xnumberYes

sqrt

sqrt(x: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
xnumberYes

sign

sign(x: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
xnumberYes

exp

exp(x: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
xnumberYes

sin

sin(x: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
xnumberYes

cos

cos(x: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
xnumberYes

tan

tan(x: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
xnumberYes

asin

asin(x: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
xnumberYes

acos

acos(x: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
xnumberYes

atan

atan(x: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
xnumberYes

floor

floor(x: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
xnumberYes

ceil

ceil(x: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
xnumberYes

round

round(x: number): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
xnumberYes

avg

avg(...values: number[]): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
valuesnumber[]Yes

n

n(context: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
contextIContextYes

isZero

isZero: (v: number) => number;

Use the type signature above and the integration guide for the owning capability.

toBool

toBool(v: number): boolean;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
vnumberYes

currencyCode

currencyCode(ctx: IContext): string | null | undefined;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
ctxIContextYes

unitId

unitId(ctx: IContext): string | null | undefined;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
ctxIContextYes

interval

interval(ctx: IContext): number;

Use the type signature above and the integration guide for the owning capability.

ParameterTypeRequired
ctxIContextYes

On this page