Interface: IContext
Charting Library.IContext
PineJS execution context.
Properties
symbol
• symbol: ISymbolInstrument
Symbol Instrument
Methods
is_main_symbol
▸ is_main_symbol(symbol
): boolean
Checks if symbol is the main symbol
Parameters
Name | Type | Description |
---|---|---|
symbol | ISymbolInstrument | symbol to check |
Returns
boolean
true
if symbol is the main symbol
new_ctx
▸ new_ctx(): IContext
Creates a new context
Returns
new_sym
▸ new_sym(tickerid
, period
, currencyCode?
, unitId?
, subsessionId?
): ISymbolInstrument
Load a new symbol for the custom indicator
Parameters
Name | Type | Description |
---|---|---|
tickerid | string | Symbol identifier |
period | string | period for the new symbol |
currencyCode? | string | Currency code |
unitId? | string | Unit ID |
subsessionId? | string | Subsession ID |
Returns
new_unlimited_var
▸ new_unlimited_var(value?
): IPineSeries
Creates an in-memory temporary storage with unlimited depth.
Parameters
Name | Type | Description |
---|---|---|
value? | number | variable's value |
Returns
new_var
▸ new_var(value?
): IPineSeries
Creates an in-memory temporary storage with depth defined by the first call new_var(value).get(n)
Parameters
Name | Type | Description |
---|---|---|
value? | number | variable's value |
Returns
select_sym
▸ select_sym(i
): void
Switch context to the other symbol received through IContext.new_sym
Parameters
Name | Type | Description |
---|---|---|
i | number | the index of the symbol (0 for the main series) |
Returns
void