# Scripting v3 compact reference

Language version: 3

| ID | Kind | Family | Summary | Canonical reference |
| --- | --- | --- | --- | --- |
| `BookDepth` | record | data | Describes order-book depth over a price band. | [reference](/scripting/v3/reference/catalog/data#ref-BookDepth) |
| `BookLevel` | record | data | One order-book price level. | [reference](/scripting/v3/reference/catalog/data#ref-BookLevel) |
| `BookLevels` | record | data | Price levels on one side of the order book. | [reference](/scripting/v3/reference/catalog/data#ref-BookLevels) |
| `BookSideSummary` | record | data | Describes one order-book side over a price band. | [reference](/scripting/v3/reference/catalog/data#ref-BookSideSummary) |
| `BookSub` | record | data | Order-book snapshots read through subscription methods. | [reference](/scripting/v3/reference/catalog/data#ref-BookSub) |
| `C001` | diagnostic |  | mutation of a frozen value | [reference](/scripting/v3/reference/diagnostics/c001) |
| `C002` | diagnostic |  | read-only collection passed to a function that changes it | [reference](/scripting/v3/reference/diagnostics/c002) |
| `C003` | diagnostic |  | collection cannot contain another collection | [reference](/scripting/v3/reference/diagnostics/c003) |
| `C004` | diagnostic |  | key is missing from a frozen map | [reference](/scripting/v3/reference/diagnostics/c004) |
| `C005` | diagnostic |  | empty array needs an explicit capacity | [reference](/scripting/v3/reference/diagnostics/c005) |
| `C006` | diagnostic |  | mutation of a read-only subscription series | [reference](/scripting/v3/reference/diagnostics/c006) |
| `C007` | diagnostic |  | series cannot be saved or passed here | [reference](/scripting/v3/reference/diagnostics/c007) |
| `CvdForming` | record | data | Cumulative volume-delta values for the current forming bar. | [reference](/scripting/v3/reference/catalog/data#ref-CvdForming) |
| `CvdSub` | record | data | Cumulative volume-delta data for this script run. | [reference](/scripting/v3/reference/catalog/data#ref-CvdSub) |
| `FootprintBucket` | record | data | One price bucket containing grouped volume. | [reference](/scripting/v3/reference/catalog/data#ref-FootprintBucket) |
| `I000` | diagnostic |  | something went wrong while checking this script | [reference](/scripting/v3/reference/diagnostics/i000) |
| `L001` | diagnostic |  | too many separate stateful calculations | [reference](/scripting/v3/reference/diagnostics/l001) |
| `L002` | diagnostic |  | struct field limit exceeded | [reference](/scripting/v3/reference/diagnostics/l002) |
| `L003` | diagnostic |  | user type limit exceeded | [reference](/scripting/v3/reference/diagnostics/l003) |
| `L004` | diagnostic |  | struct nesting limit exceeded | [reference](/scripting/v3/reference/diagnostics/l004) |
| `L005` | diagnostic |  | map key is too long | [reference](/scripting/v3/reference/diagnostics/l005) |
| `L006` | diagnostic |  | subscription declaration limit exceeded | [reference](/scripting/v3/reference/diagnostics/l006) |
| `L007` | diagnostic |  | collection or series capacity exceeds the supported limit | [reference](/scripting/v3/reference/diagnostics/l007) |
| `L008` | diagnostic |  | negative collection/series capacity | [reference](/scripting/v3/reference/diagnostics/l008) |
| `L009` | diagnostic |  | source exceeds the maximum size | [reference](/scripting/v3/reference/diagnostics/l009) |
| `L010` | diagnostic |  | input declaration limit exceeded | [reference](/scripting/v3/reference/diagnostics/l010) |
| `L011` | diagnostic |  | plot declaration limit exceeded | [reference](/scripting/v3/reference/diagnostics/l011) |
| `L012` | diagnostic |  | fill declaration limit exceeded | [reference](/scripting/v3/reference/diagnostics/l012) |
| `L013` | diagnostic |  | alert declaration limit exceeded | [reference](/scripting/v3/reference/diagnostics/l013) |
| `L014` | diagnostic |  | alert payload field limit exceeded | [reference](/scripting/v3/reference/diagnostics/l014) |
| `N001` | diagnostic |  | value may be null here | [reference](/scripting/v3/reference/diagnostics/n001) |
| `N002` | diagnostic |  | null check on a field or index does not carry over | [reference](/scripting/v3/reference/diagnostics/n002) |
| `N003` | diagnostic |  | null needs an explicit type | [reference](/scripting/v3/reference/diagnostics/n003) |
| `OhlcvForming` | record | data | Price and volume values for the current forming bar. | [reference](/scripting/v3/reference/catalog/data#ref-OhlcvForming) |
| `OhlcvSub` | record | data | OHLCV subscription record. | [reference](/scripting/v3/reference/catalog/data#ref-OhlcvSub) |
| `OiForming` | record | data | Open-interest values for the current forming bar. | [reference](/scripting/v3/reference/catalog/data#ref-OiForming) |
| `OiSub` | record | data | Open-interest subscription record. | [reference](/scripting/v3/reference/catalog/data#ref-OiSub) |
| `P001` | diagnostic |  | unrecognized token | [reference](/scripting/v3/reference/diagnostics/p001) |
| `P002` | diagnostic |  | unterminated string literal | [reference](/scripting/v3/reference/diagnostics/p002) |
| `P003` | diagnostic |  | semicolon is not supported | [reference](/scripting/v3/reference/diagnostics/p003) |
| `P004` | diagnostic |  | legacy logical operator spelling | [reference](/scripting/v3/reference/diagnostics/p004) |
| `P005` | diagnostic |  | `??` mixed with `&&` or `\|\|` needs parentheses | [reference](/scripting/v3/reference/diagnostics/p005) |
| `P006` | diagnostic |  | `while` is not supported | [reference](/scripting/v3/reference/diagnostics/p006) |
| `P007` | diagnostic |  | template strings are not supported | [reference](/scripting/v3/reference/diagnostics/p007) |
| `P008` | diagnostic |  | `?.` is not supported | [reference](/scripting/v3/reference/diagnostics/p008) |
| `P009` | diagnostic |  | postfix `!` is not supported | [reference](/scripting/v3/reference/diagnostics/p009) |
| `P011` | diagnostic |  | top-level statement is not a declaration | [reference](/scripting/v3/reference/diagnostics/p011) |
| `P014` | diagnostic |  | `break` and `continue` are not statements | [reference](/scripting/v3/reference/diagnostics/p014) |
| `P016` | diagnostic |  | expected token | [reference](/scripting/v3/reference/diagnostics/p016) |
| `P017` | diagnostic |  | script options block is removed | [reference](/scripting/v3/reference/diagnostics/p017) |
| `P018` | diagnostic |  | bracket destructuring is not supported | [reference](/scripting/v3/reference/diagnostics/p018) |
| `P019` | diagnostic |  | loop variables cannot be wrapped in parentheses | [reference](/scripting/v3/reference/diagnostics/p019) |
| `P021` | diagnostic |  | invalid color literal | [reference](/scripting/v3/reference/diagnostics/p021) |
| `P022` | diagnostic |  | unknown string escape | [reference](/scripting/v3/reference/diagnostics/p022) |
| `P023` | diagnostic |  | match arm body statement requires a block | [reference](/scripting/v3/reference/diagnostics/p023) |
| `P024` | diagnostic |  | match expression arm takes an expression, not a block | [reference](/scripting/v3/reference/diagnostics/p024) |
| `P025` | diagnostic |  | keyword used as a declaration name | [reference](/scripting/v3/reference/diagnostics/p025) |
| `P026` | diagnostic |  | ternary broken before `?` or `:` | [reference](/scripting/v3/reference/diagnostics/p026) |
| `P027` | diagnostic |  | second statement on the same line | [reference](/scripting/v3/reference/diagnostics/p027) |
| `Profile` | record | data | Volume combined across a rolling window of snapshots. | [reference](/scripting/v3/reference/catalog/data#ref-Profile) |
| `S001` | diagnostic |  | live value used in setup | [reference](/scripting/v3/reference/diagnostics/s001) |
| `S002` | diagnostic |  | built-in function cannot run in setup | [reference](/scripting/v3/reference/diagnostics/s002) |
| `S003` | diagnostic |  | resource must be declared during setup | [reference](/scripting/v3/reference/diagnostics/s003) |
| `S004` | diagnostic |  | collection with a capacity cannot be a plain setup value | [reference](/scripting/v3/reference/diagnostics/s004) |
| `S005` | diagnostic |  | collection capacity must be known before the script runs | [reference](/scripting/v3/reference/diagnostics/s005) |
| `S006` | diagnostic |  | duplicate panel name | [reference](/scripting/v3/reference/diagnostics/s006) |
| `S007` | diagnostic |  | incorrect declaration | [reference](/scripting/v3/reference/diagnostics/s007) |
| `S008` | diagnostic |  | user function called in a setup expression | [reference](/scripting/v3/reference/diagnostics/s008) |
| `S009` | diagnostic |  | state initializer calls a function that needs live data | [reference](/scripting/v3/reference/diagnostics/s009) |
| `S010` | diagnostic |  | setup value uses a built-in that cannot run in setup | [reference](/scripting/v3/reference/diagnostics/s010) |
| `S011` | diagnostic |  | setup declaration reads a later-declared binding | [reference](/scripting/v3/reference/diagnostics/s011) |
| `S012` | diagnostic |  | empty exchange list in subscription | [reference](/scripting/v3/reference/diagnostics/s012) |
| `S013` | diagnostic |  | color scale needs matching lists with at least two entries | [reference](/scripting/v3/reference/diagnostics/s013) |
| `S014` | diagnostic |  | color scale positions must be finite and in ascending order | [reference](/scripting/v3/reference/diagnostics/s014) |
| `S015` | diagnostic |  | minimum trade size must be positive and finite | [reference](/scripting/v3/reference/diagnostics/s015) |
| `S016` | diagnostic |  | series must be created in a state initializer | [reference](/scripting/v3/reference/diagnostics/s016) |
| `S017` | diagnostic |  | series history depth must be known before the script runs | [reference](/scripting/v3/reference/diagnostics/s017) |
| `S018` | diagnostic |  | lambda or collection transform in setup or state initializer | [reference](/scripting/v3/reference/diagnostics/s018) |
| `S019` | diagnostic |  | alert constructor outside an alert declaration | [reference](/scripting/v3/reference/diagnostics/s019) |
| `S020` | diagnostic |  | invalid alert payload type | [reference](/scripting/v3/reference/diagnostics/s020) |
| `S021` | diagnostic |  | trigger must be called on a declared alert | [reference](/scripting/v3/reference/diagnostics/s021) |
| `S022` | diagnostic |  | trigger argument count does not match the alert's payload | [reference](/scripting/v3/reference/diagnostics/s022) |
| `S023` | diagnostic |  | trigger result used as a value | [reference](/scripting/v3/reference/diagnostics/s023) |
| `S024` | diagnostic |  | alert handle re-bound in setup | [reference](/scripting/v3/reference/diagnostics/s024) |
| `S025` | diagnostic |  | input group cannot be assigned to a variable | [reference](/scripting/v3/reference/diagnostics/s025) |
| `S026` | diagnostic |  | subscription history cannot be negative | [reference](/scripting/v3/reference/diagnostics/s026) |
| `S027` | diagnostic |  | the chart subscription cannot be live only | [reference](/scripting/v3/reference/diagnostics/s027) |
| `StatForming` | record | data | Latest market-statistics values for the current forming bar. | [reference](/scripting/v3/reference/catalog/data#ref-StatForming) |
| `StatSub` | record | data | Market-statistics subscription record. | [reference](/scripting/v3/reference/catalog/data#ref-StatSub) |
| `T001` | diagnostic |  | unknown identifier | [reference](/scripting/v3/reference/diagnostics/t001) |
| `T002` | diagnostic |  | duplicate top-level name | [reference](/scripting/v3/reference/diagnostics/t002) |
| `T003` | diagnostic |  | removed builtin | [reference](/scripting/v3/reference/diagnostics/t003) |
| `T004` | diagnostic |  | renamed builtin | [reference](/scripting/v3/reference/diagnostics/t004) |
| `T005` | diagnostic |  | unknown type name | [reference](/scripting/v3/reference/diagnostics/t005) |
| `T006` | diagnostic |  | local shadows builtin namespace | [reference](/scripting/v3/reference/diagnostics/t006) |
| `T007` | diagnostic |  | rebinding a visible local or parameter | [reference](/scripting/v3/reference/diagnostics/t007) |
| `T008` | diagnostic |  | binding a declared type name | [reference](/scripting/v3/reference/diagnostics/t008) |
| `T009` | diagnostic |  | user type shadows a builtin type name | [reference](/scripting/v3/reference/diagnostics/t009) |
| `T010` | diagnostic |  | script declaration missing or misplaced | [reference](/scripting/v3/reference/diagnostics/t010) |
| `T011` | diagnostic |  | duplicate display title | [reference](/scripting/v3/reference/diagnostics/t011) |
| `T012` | diagnostic |  | diagnostic output truncated | [reference](/scripting/v3/reference/diagnostics/t012) |
| `T013` | diagnostic |  | unused binding | [reference](/scripting/v3/reference/diagnostics/t013) |
| `T014` | diagnostic |  | unused subscription | [reference](/scripting/v3/reference/diagnostics/t014) |
| `T015` | diagnostic |  | script title contains NUL | [reference](/scripting/v3/reference/diagnostics/t015) |
| `T016` | diagnostic |  | duplicate input key | [reference](/scripting/v3/reference/diagnostics/t016) |
| `T101` | diagnostic |  | type mismatch | [reference](/scripting/v3/reference/diagnostics/t101) |
| `T102` | diagnostic |  | operator not defined for operand types | [reference](/scripting/v3/reference/diagnostics/t102) |
| `T103` | diagnostic |  | float needs an explicit conversion to int | [reference](/scripting/v3/reference/diagnostics/t103) |
| `T104` | diagnostic |  | nullable collection type | [reference](/scripting/v3/reference/diagnostics/t104) |
| `T105` | diagnostic |  | `array<T>` annotation spelling | [reference](/scripting/v3/reference/diagnostics/t105) |
| `T106` | diagnostic |  | invalid map key type | [reference](/scripting/v3/reference/diagnostics/t106) |
| `T107` | diagnostic |  | invalid series element type | [reference](/scripting/v3/reference/diagnostics/t107) |
| `T109` | diagnostic |  | type is not indexable | [reference](/scripting/v3/reference/diagnostics/t109) |
| `T110` | diagnostic |  | `array<T>(n)` constructor spelling is removed | [reference](/scripting/v3/reference/diagnostics/t110) |
| `T111` | diagnostic |  | invalid timeframe literal | [reference](/scripting/v3/reference/diagnostics/t111) |
| `T112` | diagnostic |  | zero-valued timeframe literal | [reference](/scripting/v3/reference/diagnostics/t112) |
| `T113` | diagnostic |  | integer literal out of `int` range | [reference](/scripting/v3/reference/diagnostics/t113) |
| `T114` | diagnostic |  | invalid session time literal | [reference](/scripting/v3/reference/diagnostics/t114) |
| `T115` | diagnostic |  | nullable array element type | [reference](/scripting/v3/reference/diagnostics/t115) |
| `T201` | diagnostic |  | unknown named argument | [reference](/scripting/v3/reference/diagnostics/t201) |
| `T202` | diagnostic |  | positional argument after named | [reference](/scripting/v3/reference/diagnostics/t202) |
| `T203` | diagnostic |  | argument is supplied more than once | [reference](/scripting/v3/reference/diagnostics/t203) |
| `T204` | diagnostic |  | missing argument | [reference](/scripting/v3/reference/diagnostics/t204) |
| `T205` | diagnostic |  | too many positional values | [reference](/scripting/v3/reference/diagnostics/t205) |
| `T206` | diagnostic |  | parameter default is not a literal constant | [reference](/scripting/v3/reference/diagnostics/t206) |
| `T207` | diagnostic |  | required parameter follows an optional parameter | [reference](/scripting/v3/reference/diagnostics/t207) |
| `T208` | diagnostic |  | null default for non-nullable parameter | [reference](/scripting/v3/reference/diagnostics/t208) |
| `T209` | diagnostic |  | unsupported number of return types | [reference](/scripting/v3/reference/diagnostics/t209) |
| `T210` | diagnostic |  | calendar unit literal needs a timeframe or duration context | [reference](/scripting/v3/reference/diagnostics/t210) |
| `T211` | diagnostic |  | wrong number of return values | [reference](/scripting/v3/reference/diagnostics/t211) |
| `T212` | diagnostic |  | not all code paths return a value | [reference](/scripting/v3/reference/diagnostics/t212) |
| `T213` | diagnostic |  | multi-return call outside destructure or tail return | [reference](/scripting/v3/reference/diagnostics/t213) |
| `T214` | diagnostic |  | destructure target list error | [reference](/scripting/v3/reference/diagnostics/t214) |
| `T215` | diagnostic |  | no overload matches these arguments | [reference](/scripting/v3/reference/diagnostics/t215) |
| `T216` | diagnostic |  | value cannot be reassigned | [reference](/scripting/v3/reference/diagnostics/t216) |
| `T217` | diagnostic |  | invalid assignment target | [reference](/scripting/v3/reference/diagnostics/t217) |
| `T301` | diagnostic |  | struct field is missing a type annotation | [reference](/scripting/v3/reference/diagnostics/t301) |
| `T302` | diagnostic |  | struct contains itself | [reference](/scripting/v3/reference/diagnostics/t302) |
| `T303` | diagnostic |  | type name is not UpperCamel | [reference](/scripting/v3/reference/diagnostics/t303) |
| `T304` | diagnostic |  | match does not cover every case | [reference](/scripting/v3/reference/diagnostics/t304) |
| `T305` | diagnostic |  | null case used for a value that cannot be null | [reference](/scripting/v3/reference/diagnostics/t305) |
| `T306` | diagnostic |  | struct literal field error | [reference](/scripting/v3/reference/diagnostics/t306) |
| `T307` | diagnostic |  | duplicate field in type declaration | [reference](/scripting/v3/reference/diagnostics/t307) |
| `T401` | diagnostic |  | function calls itself directly or indirectly | [reference](/scripting/v3/reference/diagnostics/t401) |
| `T402` | diagnostic |  | stateful calculation inside a loop | [reference](/scripting/v3/reference/diagnostics/t402) |
| `T403` | diagnostic |  | indicator input mixes timeframes | [reference](/scripting/v3/reference/diagnostics/t403) |
| `T405` | diagnostic |  | invalid handler for this subscription | [reference](/scripting/v3/reference/diagnostics/t405) |
| `T406` | diagnostic |  | duplicate handler | [reference](/scripting/v3/reference/diagnostics/t406) |
| `T407` | diagnostic |  | handler on snapshot source | [reference](/scripting/v3/reference/diagnostics/t407) |
| `T408` | diagnostic |  | TA source uses a calendar timeframe | [reference](/scripting/v3/reference/diagnostics/t408) |
| `T409` | diagnostic |  | changing history index needs an explicit series depth | [reference](/scripting/v3/reference/diagnostics/t409) |
| `T410` | diagnostic |  | indicator over a book or volume view | [reference](/scripting/v3/reference/diagnostics/t410) |
| `T411` | diagnostic |  | source has no forming view | [reference](/scripting/v3/reference/diagnostics/t411) |
| `T412` | diagnostic |  | parameter list on a handler for one subscription | [reference](/scripting/v3/reference/diagnostics/t412) |
| `T413` | diagnostic |  | indicator length must be known before the script runs | [reference](/scripting/v3/reference/diagnostics/t413) |
| `T414` | diagnostic |  | TA window length out of range | [reference](/scripting/v3/reference/diagnostics/t414) |
| `T415` | diagnostic |  | plot method does not match the panel | [reference](/scripting/v3/reference/diagnostics/t415) |
| `T416` | diagnostic |  | invalid str.format template | [reference](/scripting/v3/reference/diagnostics/t416) |
| `T417` | diagnostic |  | invalid time.format template | [reference](/scripting/v3/reference/diagnostics/t417) |
| `T418` | diagnostic |  | subscription must refer to one known data source | [reference](/scripting/v3/reference/diagnostics/t418) |
| `T419` | diagnostic |  | alias must refer directly to one declared scale, window, pane, or alert | [reference](/scripting/v3/reference/diagnostics/t419) |
| `T420` | diagnostic |  | trade fields are read-only | [reference](/scripting/v3/reference/diagnostics/t420) |
| `T421` | diagnostic |  | fill boundaries belong to different panes | [reference](/scripting/v3/reference/diagnostics/t421) |
| `T422` | diagnostic |  | book and profile views only live for the current update | [reference](/scripting/v3/reference/diagnostics/t422) |
| `T423` | diagnostic |  | profile length must be known before the script runs | [reference](/scripting/v3/reference/diagnostics/t423) |
| `T424` | diagnostic |  | profile must be read through its own methods | [reference](/scripting/v3/reference/diagnostics/t424) |
| `T425` | diagnostic |  | solid and gradient colors given to one fill call | [reference](/scripting/v3/reference/diagnostics/t425) |
| `T426` | diagnostic |  | invalid lambda position or body | [reference](/scripting/v3/reference/diagnostics/t426) |
| `T427` | diagnostic |  | invalid lambda parameter list | [reference](/scripting/v3/reference/diagnostics/t427) |
| `T428` | diagnostic |  | stateful calculation, randomness, or drawing inside a lambda | [reference](/scripting/v3/reference/diagnostics/t428) |
| `T429` | diagnostic |  | lambda changes the collection it is reading | [reference](/scripting/v3/reference/diagnostics/t429) |
| `T430` | diagnostic |  | collection transform must be a separate statement | [reference](/scripting/v3/reference/diagnostics/t430) |
| `T431` | diagnostic |  | collection transform on a series | [reference](/scripting/v3/reference/diagnostics/t431) |
| `T432` | diagnostic |  | save the value in a variable before changing it | [reference](/scripting/v3/reference/diagnostics/t432) |
| `T433` | diagnostic |  | invalid use of `self` | [reference](/scripting/v3/reference/diagnostics/t433) |
| `T434` | diagnostic |  | duplicate method or method/field name collision in a type | [reference](/scripting/v3/reference/diagnostics/t434) |
| `T435` | diagnostic |  | lambda cannot change its element copy | [reference](/scripting/v3/reference/diagnostics/t435) |
| `T436` | diagnostic |  | loop or handler variable cannot be reassigned | [reference](/scripting/v3/reference/diagnostics/t436) |
| `T437` | diagnostic |  | table row cell count differs from the declared column count | [reference](/scripting/v3/reference/diagnostics/t437) |
| `T438` | diagnostic |  | unsupported table cell value type | [reference](/scripting/v3/reference/diagnostics/t438) |
| `T439` | diagnostic |  | time coordinate on a pixel-positioned axis | [reference](/scripting/v3/reference/diagnostics/t439) |
| `T440` | diagnostic |  | fill lines use different kinds of coordinates | [reference](/scripting/v3/reference/diagnostics/t440) |
| `T441` | diagnostic |  | extension direction does not work with this anchor | [reference](/scripting/v3/reference/diagnostics/t441) |
| `T442` | diagnostic |  | struct literal does not start with a type name | [reference](/scripting/v3/reference/diagnostics/t442) |
| `T443` | diagnostic |  | title literal exceeds 256 bytes | [reference](/scripting/v3/reference/diagnostics/t443) |
| `T444` | diagnostic |  | plot anchor is not a top or bottom edge | [reference](/scripting/v3/reference/diagnostics/t444) |
| `T445` | diagnostic |  | arrow has a vertical extend mode | [reference](/scripting/v3/reference/diagnostics/t445) |
| `T446` | diagnostic |  | window field value is not a panel | [reference](/scripting/v3/reference/diagnostics/t446) |
| `T447` | diagnostic |  | horizontal histogram targets a non-category panel | [reference](/scripting/v3/reference/diagnostics/t447) |
| `T448` | diagnostic |  | panel is shared between window fields | [reference](/scripting/v3/reference/diagnostics/t448) |
| `T449` | diagnostic |  | isLast read inside a close handler | [reference](/scripting/v3/reference/diagnostics/t449) |
| `Trade` | record | data | Single trade-tape event, delivered to `on sub.trade`. | [reference](/scripting/v3/reference/catalog/data#ref-Trade) |
| `TradesSub` | record | data | Delivers trades through `on sub.trade(tr)`; trades cannot be read as subscription fields. | [reference](/scripting/v3/reference/catalog/data#ref-TradesSub) |
| `VdForming` | record | data | Volume-delta values for the current forming bar. | [reference](/scripting/v3/reference/catalog/data#ref-VdForming) |
| `VdSub` | record | data | Volume-delta subscription record. | [reference](/scripting/v3/reference/catalog/data#ref-VdSub) |
| `VolumeArea` | record | data | Describes a volume-profile value area. | [reference](/scripting/v3/reference/catalog/data#ref-VolumeArea) |
| `VolumeBuckets` | record | data | Volume grouped into price buckets. | [reference](/scripting/v3/reference/catalog/data#ref-VolumeBuckets) |
| `VolumeLevel` | record | data | Represents one volume-profile level. | [reference](/scripting/v3/reference/catalog/data#ref-VolumeLevel) |
| `VolumeLevels` | record | data | Price levels in a volume profile. | [reference](/scripting/v3/reference/catalog/data#ref-VolumeLevels) |
| `VolumeSub` | record | data | Volume-profile snapshots read through subscription methods. | [reference](/scripting/v3/reference/catalog/data#ref-VolumeSub) |
| `VolumeSummary` | record | data | Summarizes a volume-profile snapshot. | [reference](/scripting/v3/reference/catalog/data#ref-VolumeSummary) |
| `alert` | callable | alert | Declares an alert that the script can trigger. | [reference](/scripting/v3/reference/catalog/alert#ref-alert) |
| `alert.trigger` | callable | alert | Triggers an alert on live data. | [reference](/scripting/v3/reference/catalog/alert#ref-alert-2etrigger) |
| `align.center` | constant | surfaces | Centers text. | [reference](/scripting/v3/reference/catalog/surfaces#ref-align-2ecenter) |
| `align.left` | constant | surfaces | Aligns text to the left. This is the default for columns and cells. | [reference](/scripting/v3/reference/catalog/surfaces#ref-align-2eleft) |
| `align.right` | constant | surfaces | Aligns text to the right. | [reference](/scripting/v3/reference/catalog/surfaces#ref-align-2eright) |
| `anchor.bottom` | constant | entities | Pins y to logical pixels up from the pane's bottom edge; x stays in chart space. | [reference](/scripting/v3/reference/catalog/entities#ref-anchor-2ebottom) |
| `anchor.bottomCenter` | constant | entities | Offsets from the center of the pane's bottom edge. | [reference](/scripting/v3/reference/catalog/entities#ref-anchor-2ebottomCenter) |
| `anchor.bottomLeft` | constant | entities | Offsets inward from the pane's bottom-left corner. | [reference](/scripting/v3/reference/catalog/entities#ref-anchor-2ebottomLeft) |
| `anchor.bottomRight` | constant | entities | Offsets inward from the pane's bottom-right corner. | [reference](/scripting/v3/reference/catalog/entities#ref-anchor-2ebottomRight) |
| `anchor.center` | constant | entities | Offsets from the center of the pane. | [reference](/scripting/v3/reference/catalog/entities#ref-anchor-2ecenter) |
| `anchor.left` | constant | entities | Pins x to logical pixels right of the pane's left edge; y stays in chart space. | [reference](/scripting/v3/reference/catalog/entities#ref-anchor-2eleft) |
| `anchor.middleLeft` | constant | entities | Offsets from the center of the pane's left edge. | [reference](/scripting/v3/reference/catalog/entities#ref-anchor-2emiddleLeft) |
| `anchor.middleRight` | constant | entities | Offsets from the center of the pane's right edge. | [reference](/scripting/v3/reference/catalog/entities#ref-anchor-2emiddleRight) |
| `anchor.right` | constant | entities | Pins x to logical pixels left of the pane's right edge; y stays in chart space. | [reference](/scripting/v3/reference/catalog/entities#ref-anchor-2eright) |
| `anchor.top` | constant | entities | Pins y to logical pixels down from the pane's top edge; x stays in chart space. | [reference](/scripting/v3/reference/catalog/entities#ref-anchor-2etop) |
| `anchor.topCenter` | constant | entities | Offsets from the center of the pane's top edge. | [reference](/scripting/v3/reference/catalog/entities#ref-anchor-2etopCenter) |
| `anchor.topLeft` | constant | entities | Offsets inward from the pane's top-left corner. | [reference](/scripting/v3/reference/catalog/entities#ref-anchor-2etopLeft) |
| `anchor.topRight` | constant | entities | Offsets inward from the pane's top-right corner. | [reference](/scripting/v3/reference/catalog/entities#ref-anchor-2etopRight) |
| `arrays` | topic | primer | `T[](n)` arrays (capacity n, length 0), `rolling<T>(n)` buffers, `map<K, V>(n)`: every runtime constructor takes a setup-constant capacity; reads are `T?` (null out of bounds); `xs[i] = v` needs i < len (push first), adding to a full array stops the script with an error; `float[]` may hold null, other element types may not. | [reference](/scripting/v3/machine/agent-primer.md#collections) |
| `axis.category` | constant | surfaces | Uses string labels as keys, for example for bars grouped by exchange or symbol. | [reference](/scripting/v3/reference/catalog/surfaces#ref-axis-2ecategory) |
| `axis.index` | constant | surfaces | Uses integer positions as keys, for example for distributions. | [reference](/scripting/v3/reference/catalog/surfaces#ref-axis-2eindex) |
| `axis.time` | constant | surfaces | Uses time values as keys, for example for custom candles or session bars. | [reference](/scripting/v3/reference/catalog/surfaces#ref-axis-2etime) |
| `bookunit.base` | constant | data | Selects base quantity for book imbalance calculations. | [reference](/scripting/v3/reference/catalog/data#ref-bookunit-2ebase) |
| `bookunit.quote` | constant | data | Selects quote value for book imbalance calculations. | [reference](/scripting/v3/reference/catalog/data#ref-bookunit-2equote) |
| `cellcandles.hidden` | constant | plot | The chart's candles are not drawn. | [reference](/scripting/v3/reference/catalog/plot#ref-cellcandles-2ehidden) |
| `cellcandles.overlay` | constant | plot | The chart's candles are drawn as usual, behind the cells. | [reference](/scripting/v3/reference/catalog/plot#ref-cellcandles-2eoverlay) |
| `cellcandles.side` | constant | plot | The chart's candles are drawn as a thin strip at the left edge of each bar, beside the cells. | [reference](/scripting/v3/reference/catalog/plot#ref-cellcandles-2eside) |
| `cellformat.compact` | constant | plot | Large numbers are shortened with a suffix, such as 3.21K or 53.1M. | [reference](/scripting/v3/reference/catalog/plot#ref-cellformat-2ecompact) |
| `cellformat.fixed` | constant | plot | The number is written in full, such as 3214.56. | [reference](/scripting/v3/reference/catalog/plot#ref-cellformat-2efixed) |
| `cellformat.percent` | constant | plot | The value is a ratio written as a percentage, so 0.153 reads 15.3%. | [reference](/scripting/v3/reference/catalog/plot#ref-cellformat-2epercent) |
| `cellscale.bar` | constant | plot | A full-width cell has the largest weight on its own bar. | [reference](/scripting/v3/reference/catalog/plot#ref-cellscale-2ebar) |
| `cellscale.unit` | constant | plot | The weight is the width itself, as a fraction from 0 to 1. | [reference](/scripting/v3/reference/catalog/plot#ref-cellscale-2eunit) |
| `cellscale.view` | constant | plot | A full-width cell has the largest weight on the visible bars. | [reference](/scripting/v3/reference/catalog/plot#ref-cellscale-2eview) |
| `chart.panel` | callable | surfaces | Adds a chart panel to a window. | [reference](/scripting/v3/reference/catalog/surfaces#ref-chart-2epanel) |
| `close` | event | data | Runs once when a bar closes and becomes confirmed. | [reference](/scripting/v3/reference/catalog/data#ref-close) |
| `collection.absSum` | callable | collections | Adds the absolute values of the non-null numbers. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2eabsSum) |
| `collection.avg` | callable | collections | Returns the average of the non-null numbers. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2eavg) |
| `collection.avgLast` | callable | collections | Averages the numbers in the last `n` elements. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2eavgLast) |
| `collection.capacity` | callable | collections | Returns the maximum number of items the collection can hold. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2ecapacity) |
| `collection.clear` | callable | collections | Removes every item from the collection. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2eclear) |
| `collection.countEq` | callable | collections | Counts the elements equal to a value. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2ecountEq) |
| `collection.countGt` | callable | collections | Counts the numbers greater than a value. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2ecountGt) |
| `collection.countGte` | callable | collections | Counts the numbers greater than or equal to a value. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2ecountGte) |
| `collection.countLt` | callable | collections | Counts the numbers less than a value. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2ecountLt) |
| `collection.countLte` | callable | collections | Counts the numbers less than or equal to a value. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2ecountLte) |
| `collection.filter` | callable | collections | Creates a new array containing the elements that pass a test. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2efilter) |
| `collection.first` | callable | collections | Reads the oldest element. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2efirst) |
| `collection.get` | callable | collections | Reads the element at an index. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2eget) |
| `collection.includes` | callable | collections | Reports whether the collection contains a value. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2eincludes) |
| `collection.indexOf` | callable | collections | Finds the first element equal to a value. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2eindexOf) |
| `collection.isEmpty` | callable | collections | Reports whether the collection is empty. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2eisEmpty) |
| `collection.isFull` | callable | collections | Reports whether a rolling buffer currently holds its full capacity. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2eisFull) |
| `collection.last` | callable | collections | Reads the newest element. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2elast) |
| `collection.lastIndexOf` | callable | collections | Finds the last element equal to a value. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2elastIndexOf) |
| `collection.len` | callable | collections | Returns the number of items in the collection. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2elen) |
| `collection.map` | callable | collections | Creates a new array by transforming each element. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2emap) |
| `collection.map.delete` | callable | collections | Removes a key and its value. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2emap-2edelete) |
| `collection.map.get` | callable | collections | Reads the value stored for a key. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2emap-2eget) |
| `collection.map.has` | callable | collections | Reports whether a key exists in the map. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2emap-2ehas) |
| `collection.map.set` | callable | collections | Adds a key and value or replaces an existing value. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2emap-2eset) |
| `collection.max` | callable | collections | Returns the largest non-null number. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2emax) |
| `collection.min` | callable | collections | Returns the smallest non-null number. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2emin) |
| `collection.pop` | callable | collections | Removes and returns the newest element. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2epop) |
| `collection.push` | callable | collections | Adds an element to the end of the collection. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2epush) |
| `collection.range` | callable | collections | Returns the difference between the largest and smallest non-null numbers. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2erange) |
| `collection.reduce` | callable | collections | Combines the elements into one value. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2ereduce) |
| `collection.set` | callable | collections | Replaces the element at an index. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2eset) |
| `collection.shift` | callable | collections | Removes and returns the oldest element. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2eshift) |
| `collection.stdev` | callable | collections | Returns the population standard deviation of the non-null numbers. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2estdev) |
| `collection.sum` | callable | collections | Adds all non-null numbers. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2esum) |
| `collection.sumLast` | callable | collections | Adds the numbers in the last `n` elements. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2esumLast) |
| `collection.variance` | callable | collections | Returns the population variance of the non-null numbers. | [reference](/scripting/v3/reference/catalog/collections#ref-collection-2evariance) |
| `collections` | topic | primer | Arrays, rolling buffers and maps; `len` counts all elements, aggregates skip null; setup arrays and map literals are read-only. | [reference](/scripting/v3/machine/agent-primer.md#collections) |
| `color.a` | callable | color | Returns the alpha channel from a color. | [reference](/scripting/v3/reference/catalog/color#ref-color-2ea) |
| `color.amber` | constant | color | Amber (#f59e0b). | [reference](/scripting/v3/reference/catalog/color#ref-color-2eamber) |
| `color.b` | callable | color | Returns the blue channel from a color. | [reference](/scripting/v3/reference/catalog/color#ref-color-2eb) |
| `color.black` | constant | color | Black (#000000). | [reference](/scripting/v3/reference/catalog/color#ref-color-2eblack) |
| `color.blue` | constant | color | Blue (#466be5). | [reference](/scripting/v3/reference/catalog/color#ref-color-2eblue) |
| `color.brown` | constant | color | Brown (#a52a2a). | [reference](/scripting/v3/reference/catalog/color#ref-color-2ebrown) |
| `color.cyan` | constant | color | Cyan (#00eeff). | [reference](/scripting/v3/reference/catalog/color#ref-color-2ecyan) |
| `color.darken` | callable | color | Darkens a color by mixing it toward black. | [reference](/scripting/v3/reference/catalog/color#ref-color-2edarken) |
| `color.down` | constant | color | Bearish red (#e81f59). | [reference](/scripting/v3/reference/catalog/color#ref-color-2edown) |
| `color.emerald` | constant | color | Emerald (#16c784). | [reference](/scripting/v3/reference/catalog/color#ref-color-2eemerald) |
| `color.g` | callable | color | Returns the green channel from a color. | [reference](/scripting/v3/reference/catalog/color#ref-color-2eg) |
| `color.gradient` | callable | color | Blends between two colors based on a number. | [reference](/scripting/v3/reference/catalog/color#ref-color-2egradient) |
| `color.gray` | constant | color | Gray (#808080). | [reference](/scripting/v3/reference/catalog/color#ref-color-2egray) |
| `color.green` | constant | color | Green (#00ff00). | [reference](/scripting/v3/reference/catalog/color#ref-color-2egreen) |
| `color.indigo` | constant | color | Indigo (#2962ff). | [reference](/scripting/v3/reference/catalog/color#ref-color-2eindigo) |
| `color.lighten` | callable | color | Lightens a color by mixing it toward white. | [reference](/scripting/v3/reference/catalog/color#ref-color-2elighten) |
| `color.lightskyblue` | constant | color | Light sky blue (#87cefa). | [reference](/scripting/v3/reference/catalog/color#ref-color-2elightskyblue) |
| `color.magenta` | constant | color | Magenta (#ff00ff). | [reference](/scripting/v3/reference/catalog/color#ref-color-2emagenta) |
| `color.maroon` | constant | color | Maroon (#800000). | [reference](/scripting/v3/reference/catalog/color#ref-color-2emaroon) |
| `color.navy` | constant | color | Navy (#000080). | [reference](/scripting/v3/reference/catalog/color#ref-color-2enavy) |
| `color.olive` | constant | color | Olive (#808000). | [reference](/scripting/v3/reference/catalog/color#ref-color-2eolive) |
| `color.orange` | constant | color | Orange (#ffa500). | [reference](/scripting/v3/reference/catalog/color#ref-color-2eorange) |
| `color.pink` | constant | color | Pink (#ffc0cb). | [reference](/scripting/v3/reference/catalog/color#ref-color-2epink) |
| `color.purple` | constant | color | Purple (#800080). | [reference](/scripting/v3/reference/catalog/color#ref-color-2epurple) |
| `color.r` | callable | color | Returns the red channel from a color. | [reference](/scripting/v3/reference/catalog/color#ref-color-2er) |
| `color.red` | constant | color | Red (#e81f59). | [reference](/scripting/v3/reference/catalog/color#ref-color-2ered) |
| `color.rgb` | callable | color | Creates a color from red, green, blue, and opacity values. | [reference](/scripting/v3/reference/catalog/color#ref-color-2ergb) |
| `color.scale` | callable | color | Creates a color scale from a list of positions and colors. | [reference](/scripting/v3/reference/catalog/color#ref-color-2escale) |
| `color.silver` | constant | color | Silver (#9e9e9e). | [reference](/scripting/v3/reference/catalog/color#ref-color-2esilver) |
| `color.teal` | constant | color | Teal (#008080). | [reference](/scripting/v3/reference/catalog/color#ref-color-2eteal) |
| `color.transparent` | constant | color | Fully transparent black (#00000000). | [reference](/scripting/v3/reference/catalog/color#ref-color-2etransparent) |
| `color.up` | constant | color | Bullish green (#00ff00). | [reference](/scripting/v3/reference/catalog/color#ref-color-2eup) |
| `color.white` | constant | color | White (#ffffff). | [reference](/scripting/v3/reference/catalog/color#ref-color-2ewhite) |
| `color.withAlpha` | callable | color | Changes a color's opacity. | [reference](/scripting/v3/reference/catalog/color#ref-color-2ewithAlpha) |
| `color.yellow` | constant | color | Yellow (#ffff00). | [reference](/scripting/v3/reference/catalog/color#ref-color-2eyellow) |
| `colorscale.sample` | callable | color | Reads a color from a scale at a position. | [reference](/scripting/v3/reference/catalog/color#ref-colorscale-2esample) |
| `colorspace.hsl` | constant | color | HSL color-scale interpolation with shortest-path hue. | [reference](/scripting/v3/reference/catalog/color#ref-colorspace-2ehsl) |
| `colorspace.rgb` | constant | color | RGB color-scale interpolation by channel. | [reference](/scripting/v3/reference/catalog/color#ref-colorspace-2ergb) |
| `context.base` | context | context | `context.base: string`. Base asset of the chart symbol. Readable in any position; the value is fixed at the start of each run. A chart or configuration change restarts the script with the updated value. | [reference](/scripting/v3#chart-context) |
| `context.exchange` | context | context | `context.exchange: string`. Exchange id of the chart the script runs on. Readable in any position; the value is fixed at the start of each run. A chart or configuration change restarts the script with the updated value. | [reference](/scripting/v3#chart-context) |
| `context.quote` | context | context | `context.quote: string`. Quote asset of the chart symbol. Readable in any position; the value is fixed at the start of each run. A chart or configuration change restarts the script with the updated value. | [reference](/scripting/v3#chart-context) |
| `context.stepSize` | context | context | `context.stepSize: float`. Quantity step size of the chart symbol. Readable in any position; the value is fixed at the start of each run. A chart or configuration change restarts the script with the updated value. | [reference](/scripting/v3#chart-context) |
| `context.symbol` | context | context | `context.symbol: string`. Market symbol of the chart the script runs on. Readable in any position; the value is fixed at the start of each run. A chart or configuration change restarts the script with the updated value. | [reference](/scripting/v3#chart-context) |
| `context.tickSize` | context | context | `context.tickSize: float`. Price tick size of the chart symbol. Readable in any position; the value is fixed at the start of each run. A chart or configuration change restarts the script with the updated value. | [reference](/scripting/v3#chart-context) |
| `context.timeframe` | context | context | `context.timeframe: timeframe`. Chart timeframe; `time.tfSeconds(context.timeframe)` gives its length in seconds. Readable in any position; the value is fixed at the start of each run. A chart or configuration change restarts the script with the updated value. | [reference](/scripting/v3#chart-context) |
| `data.book` | source | data | Provides order-book snapshots to read from another subscription's handler. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook) |
| `data.book.askRange` | callable | data | Summarizes ask levels within a price range. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook-2easkRange) |
| `data.book.asks` | callable | data | Returns ask levels, starting with the best price. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook-2easks) |
| `data.book.asksTo` | callable | data | Summarizes ask depth from the best price to a chosen price. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook-2easksTo) |
| `data.book.bestAsk` | callable | data | Returns the lowest ask price. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook-2ebestAsk) |
| `data.book.bestBid` | callable | data | Returns the highest bid price. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook-2ebestBid) |
| `data.book.bidRange` | callable | data | Summarizes bid levels within a price range. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook-2ebidRange) |
| `data.book.bids` | callable | data | Returns bid levels, starting with the best price. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook-2ebids) |
| `data.book.bidsTo` | callable | data | Summarizes bid depth from the best price to a chosen price. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook-2ebidsTo) |
| `data.book.binSize` | callable | data | Returns the width of each book price bin. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook-2ebinSize) |
| `data.book.depth` | callable | data | Summarizes order-book depth around a price. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook-2edepth) |
| `data.book.imbalance` | callable | data | Returns the balance between bids and asks around a price. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook-2eimbalance) |
| `data.book.mid` | callable | data | Returns the midpoint between the best bid and ask. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook-2emid) |
| `data.book.numAsks` | callable | data | Counts the ask levels in a book snapshot. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook-2enumAsks) |
| `data.book.numBids` | callable | data | Counts the bid levels in a book snapshot. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook-2enumBids) |
| `data.book.range` | callable | data | Summarizes both bid and ask levels within a price range. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook-2erange) |
| `data.book.spread` | callable | data | Returns the gap between the best ask and bid. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook-2espread) |
| `data.book.time` | callable | data | Returns the start time of the book snapshot period. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebook-2etime) |
| `data.bookLevels.get` | callable | data | Reads an order-book level by index. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ebookLevels-2eget) |
| `data.cvd` | source | data | Subscribes to cumulative volume delta bars. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ecvd) |
| `data.cvd.change` | callable | data | Returns the change from open to close on the confirmed bar. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ecvd-2echange) |
| `data.cvd.range` | callable | data | Returns the high-to-low range of the confirmed bar. | [reference](/scripting/v3/reference/catalog/data#ref-data-2ecvd-2erange) |
| `data.ohlcv` | source | data | Subscribes to price and volume bars. | [reference](/scripting/v3/reference/catalog/data#ref-data-2eohlcv) |
| `data.ohlcv.change` | callable | data | Returns the change from open to close on the confirmed bar. | [reference](/scripting/v3/reference/catalog/data#ref-data-2eohlcv-2echange) |
| `data.ohlcv.delta` | callable | data | Returns the current OHLCV buy-sell volume delta. | [reference](/scripting/v3/reference/catalog/data#ref-data-2eohlcv-2edelta) |
| `data.ohlcv.range` | callable | data | Returns the high-to-low range of the confirmed bar. | [reference](/scripting/v3/reference/catalog/data#ref-data-2eohlcv-2erange) |
| `data.ohlcv.tradeDelta` | callable | data | Returns the current OHLCV buy-sell trade-count delta. | [reference](/scripting/v3/reference/catalog/data#ref-data-2eohlcv-2etradeDelta) |
| `data.oi` | source | data | Subscribes to open interest bars. | [reference](/scripting/v3/reference/catalog/data#ref-data-2eoi) |
| `data.oi.change` | callable | data | Returns the change from open to close on the confirmed bar. | [reference](/scripting/v3/reference/catalog/data#ref-data-2eoi-2echange) |
| `data.oi.range` | callable | data | Returns the high-to-low range of the confirmed bar. | [reference](/scripting/v3/reference/catalog/data#ref-data-2eoi-2erange) |
| `data.profile.buckets` | callable | data | Groups volume into equal-width price buckets. | [reference](/scripting/v3/reference/catalog/data#ref-data-2eprofile-2ebuckets) |
| `data.profile.bucketsByLevels` | callable | data | Groups consecutive price levels into volume buckets. | [reference](/scripting/v3/reference/catalog/data#ref-data-2eprofile-2ebucketsByLevels) |
| `data.profile.delta` | callable | data | Returns the rolling window's volume delta (buy - sell). | [reference](/scripting/v3/reference/catalog/data#ref-data-2eprofile-2edelta) |
| `data.profile.poc` | callable | data | Returns the point of control: the level with the largest selected volume. | [reference](/scripting/v3/reference/catalog/data#ref-data-2eprofile-2epoc) |
| `data.profile.ratio` | callable | data | Returns the rolling window's volume-delta ratio (delta / total). | [reference](/scripting/v3/reference/catalog/data#ref-data-2eprofile-2eratio) |
| `data.profile.summary` | callable | data | Summarizes a rolling profile, optionally within a price range. | [reference](/scripting/v3/reference/catalog/data#ref-data-2eprofile-2esummary) |
| `data.profile.total` | callable | data | Returns the rolling window's total (buy + sell) volume. | [reference](/scripting/v3/reference/catalog/data#ref-data-2eprofile-2etotal) |
| `data.profile.valueArea` | callable | data | Returns the low and high prices of a volume value area. | [reference](/scripting/v3/reference/catalog/data#ref-data-2eprofile-2evalueArea) |
| `data.stat` | source | data | Subscribes to market statistics bars. | [reference](/scripting/v3/reference/catalog/data#ref-data-2estat) |
| `data.stat.liqDelta` | callable | data | Returns the current buy-sell liquidation delta. | [reference](/scripting/v3/reference/catalog/data#ref-data-2estat-2eliqDelta) |
| `data.stat.liqTotal` | callable | data | Returns the current total liquidation value. | [reference](/scripting/v3/reference/catalog/data#ref-data-2estat-2eliqTotal) |
| `data.trades` | source | data | Delivers individual trades to a trade handler. | [reference](/scripting/v3/reference/catalog/data#ref-data-2etrades) |
| `data.vd` | source | data | Subscribes to volume delta bars. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evd) |
| `data.vd.change` | callable | data | Returns the change from open to close on the confirmed bar. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evd-2echange) |
| `data.vd.range` | callable | data | Returns the high-to-low range of the confirmed bar. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evd-2erange) |
| `data.volume` | source | data | Provides volume-profile snapshots to read from another subscription's handler. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolume) |
| `data.volume.binSize` | callable | data | Returns the width of each price bin. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolume-2ebinSize) |
| `data.volume.buckets` | callable | data | Groups volume into equal-width price buckets. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolume-2ebuckets) |
| `data.volume.bucketsByLevels` | callable | data | Groups consecutive price levels into volume buckets. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolume-2ebucketsByLevels) |
| `data.volume.bucketsByStep` | callable | data | Groups volume into price buckets of a fixed size on a shared price grid. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolume-2ebucketsByStep) |
| `data.volume.delta` | callable | data | Returns the buy volume minus sell volume. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolume-2edelta) |
| `data.volume.level` | callable | data | Reads a volume-profile level by index. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolume-2elevel) |
| `data.volume.levels` | callable | data | Returns volume-profile levels from lowest to highest price. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolume-2elevels) |
| `data.volume.numLevels` | callable | data | Returns the number of traded price levels. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolume-2enumLevels) |
| `data.volume.poc` | callable | data | Returns the point of control: the level with the largest selected volume. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolume-2epoc) |
| `data.volume.profile` | callable | data | Creates a rolling volume profile over the last `bars` confirmed snapshots. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolume-2eprofile) |
| `data.volume.ratio` | callable | data | Returns the volume delta divided by total volume. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolume-2eratio) |
| `data.volume.summary` | callable | data | Summarizes a volume profile, optionally within a price range. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolume-2esummary) |
| `data.volume.time` | callable | data | Returns the start time of the snapshot period. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolume-2etime) |
| `data.volume.total` | callable | data | Returns the total buy and sell volume. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolume-2etotal) |
| `data.volume.valueArea` | callable | data | Returns the low and high prices of a volume value area. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolume-2evalueArea) |
| `data.volumeBuckets.get` | callable | data | Reads a volume bucket by index. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolumeBuckets-2eget) |
| `data.volumeLevels.get` | callable | data | Reads a volume-profile level by index. | [reference](/scripting/v3/reference/catalog/data#ref-data-2evolumeLevels-2eget) |
| `diagnostics` | topic | primer | How to read `script_check` output: span order, at most 8 per code, parse errors never dropped, one T012 marker naming hidden counts; fix P0xx first. | [reference](/scripting/v3/machine/agent-primer.md#reading-diagnostics) |
| `easing.linear` | constant | color | Linear segment easing, leaving the local position unchanged. | [reference](/scripting/v3/reference/catalog/color#ref-easing-2elinear) |
| `easing.smootherstep` | constant | color | Smootherstep segment easing with t*t*t*(t*(6t-15)+10). | [reference](/scripting/v3/reference/catalog/color#ref-easing-2esmootherstep) |
| `easing.smoothstep` | constant | color | Smoothstep segment easing with t*t*(3-2t). | [reference](/scripting/v3/reference/catalog/color#ref-easing-2esmoothstep) |
| `entities.arrow.set` | callable | entities | Draws or updates an arrow. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2earrow-2eset) |
| `entities.arrowPool` | callable | entities | Creates a pool of arrows with a fixed limit. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2earrowPool) |
| `entities.arrowPool.capacity` | callable | entities | Returns the maximum number of arrows in the pool. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2earrowPool-2ecapacity) |
| `entities.arrowPool.clear` | callable | entities | Clears arrows by key prefix. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2earrowPool-2eclear) |
| `entities.arrowPool.delete` | callable | entities | Deletes an arrow. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2earrowPool-2edelete) |
| `entities.arrowPool.get` | callable | entities | Returns an arrow for the given keys. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2earrowPool-2eget) |
| `entities.arrowPool.has` | callable | entities | Tests whether an arrow exists. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2earrowPool-2ehas) |
| `entities.arrowPool.isEmpty` | callable | entities | Reports whether the arrow pool has no drawings. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2earrowPool-2eisEmpty) |
| `entities.arrowPool.isFull` | callable | entities | Reports whether the arrow pool is at capacity. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2earrowPool-2eisFull) |
| `entities.arrowPool.len` | callable | entities | Counts the arrows currently in the pool. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2earrowPool-2elen) |
| `entities.box.set` | callable | entities | Draws or updates a box. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2ebox-2eset) |
| `entities.boxPool` | callable | entities | Creates a pool of boxes with a fixed limit. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2eboxPool) |
| `entities.boxPool.capacity` | callable | entities | Returns the maximum number of boxes in the pool. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2eboxPool-2ecapacity) |
| `entities.boxPool.clear` | callable | entities | Removes boxes whose keys start with the given keys. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2eboxPool-2eclear) |
| `entities.boxPool.delete` | callable | entities | Deletes a box. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2eboxPool-2edelete) |
| `entities.boxPool.get` | callable | entities | Returns a box for the given keys. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2eboxPool-2eget) |
| `entities.boxPool.has` | callable | entities | Tests whether a box exists. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2eboxPool-2ehas) |
| `entities.boxPool.isEmpty` | callable | entities | Reports whether the box pool has no drawings. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2eboxPool-2eisEmpty) |
| `entities.boxPool.isFull` | callable | entities | Reports whether the box pool is at capacity. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2eboxPool-2eisFull) |
| `entities.boxPool.len` | callable | entities | Counts the boxes currently in the pool. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2eboxPool-2elen) |
| `entities.label.set` | callable | entities | Draws or updates a text label. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elabel-2eset) |
| `entities.labelPool` | callable | entities | Creates a pool of labels with a fixed limit. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elabelPool) |
| `entities.labelPool.capacity` | callable | entities | Returns the maximum number of labels in the pool. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elabelPool-2ecapacity) |
| `entities.labelPool.clear` | callable | entities | Clears labels by key prefix. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elabelPool-2eclear) |
| `entities.labelPool.delete` | callable | entities | Deletes a label. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elabelPool-2edelete) |
| `entities.labelPool.get` | callable | entities | Returns a label for the given keys. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elabelPool-2eget) |
| `entities.labelPool.has` | callable | entities | Tests whether a label exists. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elabelPool-2ehas) |
| `entities.labelPool.isEmpty` | callable | entities | Reports whether the label pool has no drawings. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elabelPool-2eisEmpty) |
| `entities.labelPool.isFull` | callable | entities | Reports whether the label pool is at capacity. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elabelPool-2eisFull) |
| `entities.labelPool.len` | callable | entities | Counts the labels currently in the pool. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elabelPool-2elen) |
| `entities.line.set` | callable | entities | Draws or updates a line. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2eline-2eset) |
| `entities.lineFill.set` | callable | entities | Draws or updates a fill between two lines. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elineFill-2eset) |
| `entities.lineFillPool` | callable | entities | Creates a pool of line fills with a fixed limit. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elineFillPool) |
| `entities.lineFillPool.capacity` | callable | entities | Returns the maximum number of line fills in the pool. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elineFillPool-2ecapacity) |
| `entities.lineFillPool.clear` | callable | entities | Clears line fills by key prefix. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elineFillPool-2eclear) |
| `entities.lineFillPool.delete` | callable | entities | Deletes a line fill. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elineFillPool-2edelete) |
| `entities.lineFillPool.get` | callable | entities | Returns a line fill for the given keys. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elineFillPool-2eget) |
| `entities.lineFillPool.has` | callable | entities | Tests whether a line fill exists. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elineFillPool-2ehas) |
| `entities.lineFillPool.isEmpty` | callable | entities | Reports whether the line fill pool has no drawings. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elineFillPool-2eisEmpty) |
| `entities.lineFillPool.isFull` | callable | entities | Reports whether the line fill pool is at capacity. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elineFillPool-2eisFull) |
| `entities.lineFillPool.len` | callable | entities | Counts the line fills currently in the pool. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elineFillPool-2elen) |
| `entities.linePool` | callable | entities | Creates a pool of lines with a fixed limit. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elinePool) |
| `entities.linePool.capacity` | callable | entities | Returns the maximum number of lines in the pool. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elinePool-2ecapacity) |
| `entities.linePool.clear` | callable | entities | Clears lines by key prefix. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elinePool-2eclear) |
| `entities.linePool.delete` | callable | entities | Deletes a line. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elinePool-2edelete) |
| `entities.linePool.get` | callable | entities | Returns a line for the given keys. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elinePool-2eget) |
| `entities.linePool.has` | callable | entities | Tests whether a line exists. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elinePool-2ehas) |
| `entities.linePool.isEmpty` | callable | entities | Reports whether the line pool has no drawings. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elinePool-2eisEmpty) |
| `entities.linePool.isFull` | callable | entities | Reports whether the line pool is at capacity. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elinePool-2eisFull) |
| `entities.linePool.len` | callable | entities | Counts the lines currently in the pool. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2elinePool-2elen) |
| `entities.marker.set` | callable | entities | Draws or updates a marker. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2emarker-2eset) |
| `entities.markerPool` | callable | entities | Creates a pool of markers with a fixed limit. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2emarkerPool) |
| `entities.markerPool.capacity` | callable | entities | Returns the maximum number of markers in the pool. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2emarkerPool-2ecapacity) |
| `entities.markerPool.clear` | callable | entities | Clears markers by key prefix. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2emarkerPool-2eclear) |
| `entities.markerPool.delete` | callable | entities | Deletes a marker. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2emarkerPool-2edelete) |
| `entities.markerPool.get` | callable | entities | Returns a marker for the given keys. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2emarkerPool-2eget) |
| `entities.markerPool.has` | callable | entities | Tests whether a marker exists. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2emarkerPool-2ehas) |
| `entities.markerPool.isEmpty` | callable | entities | Reports whether the marker pool has no drawings. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2emarkerPool-2eisEmpty) |
| `entities.markerPool.isFull` | callable | entities | Reports whether the marker pool is at capacity. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2emarkerPool-2eisFull) |
| `entities.markerPool.len` | callable | entities | Counts the markers currently in the pool. | [reference](/scripting/v3/reference/catalog/entities#ref-entities-2emarkerPool-2elen) |
| `extend.both` | constant | plot | Entity extends in both directions. | [reference](/scripting/v3/reference/catalog/plot#ref-extend-2eboth) |
| `extend.down` | constant | plot | Line or box extends downward past its bottommost endpoint to the pane edge. | [reference](/scripting/v3/reference/catalog/plot#ref-extend-2edown) |
| `extend.left` | constant | plot | Entity extends leftward past its leftmost endpoint along its slope. | [reference](/scripting/v3/reference/catalog/plot#ref-extend-2eleft) |
| `extend.none` | constant | plot | Entity does not extend beyond its x-range. | [reference](/scripting/v3/reference/catalog/plot#ref-extend-2enone) |
| `extend.right` | constant | plot | Entity extends rightward past its rightmost endpoint along its slope. | [reference](/scripting/v3/reference/catalog/plot#ref-extend-2eright) |
| `extend.up` | constant | plot | Line or box extends upward past its topmost endpoint to the pane edge. | [reference](/scripting/v3/reference/catalog/plot#ref-extend-2eup) |
| `extend.vertical` | constant | plot | Line or box extends both upward and downward to the pane edges. | [reference](/scripting/v3/reference/catalog/plot#ref-extend-2evertical) |
| `families` | topic | primer | `setup fam = for k in [...] { body }` yields a read-only map keyed by `k` — the idiom for a table of levels, plots, or pools; iterate with `for k, item in fam`. | [reference](/scripting/v3/machine/agent-primer.md#collections) |
| `fill.between` | callable | plot | Creates a fill between two line plots. | [reference](/scripting/v3/reference/catalog/plot#ref-fill-2ebetween) |
| `fill.fill` | callable | plot | Fills between the two lines on the current bar. | [reference](/scripting/v3/reference/catalog/plot#ref-fill-2efill) |
| `font.app` | constant | entities | Uses the normal chart application font. | [reference](/scripting/v3/reference/catalog/entities#ref-font-2eapp) |
| `font.mono` | constant | entities | Uses the application monospace font. | [reference](/scripting/v3/reference/catalog/entities#ref-font-2emono) |
| `heatmap.new` | callable | surfaces | Creates a heatmap panel. | [reference](/scripting/v3/reference/catalog/surfaces#ref-heatmap-2enew) |
| `htf` | topic | primer | Higher-timeframe subscription: `subscribe(data.ohlcv, timeframe: 1D)`; inside a handler `daily.high` is the last confirmed day, `daily.forming.high` the day in progress. | [reference](/scripting/v3/machine/agent-primer.md#subscriptions-and-timeframes) |
| `input.bool` | callable | input | Adds a true-or-false input to the script settings. | [reference](/scripting/v3/reference/catalog/input#ref-input-2ebool) |
| `input.color` | callable | input | Adds a color picker to the script settings. | [reference](/scripting/v3/reference/catalog/input#ref-input-2ecolor) |
| `input.exchange` | callable | input | Adds a single-exchange picker to the script settings. | [reference](/scripting/v3/reference/catalog/input#ref-input-2eexchange) |
| `input.exchanges` | callable | input | Adds a multiple-exchange picker to the script settings. | [reference](/scripting/v3/reference/catalog/input#ref-input-2eexchanges) |
| `input.float` | callable | input | Adds a decimal-number input to the script settings. | [reference](/scripting/v3/reference/catalog/input#ref-input-2efloat) |
| `input.group` | callable | input | Groups controls in the script settings. | [reference](/scripting/v3/reference/catalog/input#ref-input-2egroup) |
| `input.int` | callable | input | Adds a whole-number input to the script settings. | [reference](/scripting/v3/reference/catalog/input#ref-input-2eint) |
| `input.section` | callable | input | Adds a section heading to the script settings. | [reference](/scripting/v3/reference/catalog/input#ref-input-2esection) |
| `input.select` | callable | input | Adds a dropdown of text options to the script settings. | [reference](/scripting/v3/reference/catalog/input#ref-input-2eselect) |
| `input.tab` | callable | input | Adds a tab to the script settings. | [reference](/scripting/v3/reference/catalog/input#ref-input-2etab) |
| `input.timeframe` | callable | input | Adds a timeframe picker to the script settings. | [reference](/scripting/v3/reference/catalog/input#ref-input-2etimeframe) |
| `lines` | topic | primer | Horizontal/trend lines are entities: `entities.linePool(max: n)` in `setup` or `state`, then `pool.get(key).set(x1, y1, x2, y2, text:, color:, style:, extend:)`; `pool.delete(key)` removes one. | [reference](/scripting/v3/machine/agent-primer.md#most-used-built-ins) |
| `linestyle.dashed` | constant | plot | Dashed line style. | [reference](/scripting/v3/reference/catalog/plot#ref-linestyle-2edashed) |
| `linestyle.dotted` | constant | plot | Dotted line style. | [reference](/scripting/v3/reference/catalog/plot#ref-linestyle-2edotted) |
| `linestyle.solid` | constant | plot | Solid line style. | [reference](/scripting/v3/reference/catalog/plot#ref-linestyle-2esolid) |
| `linestyle.step` | constant | plot | Step line style. | [reference](/scripting/v3/reference/catalog/plot#ref-linestyle-2estep) |
| `log.debug` | callable | log | Writes a debug-level message to the script log. | [reference](/scripting/v3/reference/catalog/log#ref-log-2edebug) |
| `log.error` | callable | log | Writes an error-level message to the script log. | [reference](/scripting/v3/reference/catalog/log#ref-log-2eerror) |
| `log.info` | callable | log | Writes an info-level message to the script log. | [reference](/scripting/v3/reference/catalog/log#ref-log-2einfo) |
| `log.warn` | callable | log | Writes a warning-level message to the script log. | [reference](/scripting/v3/reference/catalog/log#ref-log-2ewarn) |
| `markets.agg` | callable | markets | Builds the combined exchange selection. | [reference](/scripting/v3/reference/catalog/markets#ref-markets-2eagg) |
| `markets.exchangeCategory` | callable | markets | Returns an exchange's category, such as spot or futures. | [reference](/scripting/v3/reference/catalog/markets#ref-markets-2eexchangeCategory) |
| `markets.exchangeNames` | callable | markets | Lists exchange names, optionally filtered by category. | [reference](/scripting/v3/reference/catalog/markets#ref-markets-2eexchangeNames) |
| `markets.exchangesForSymbol` | callable | markets | Lists the exchanges that offer a symbol. | [reference](/scripting/v3/reference/catalog/markets#ref-markets-2eexchangesForSymbol) |
| `markets.hasExchange` | callable | markets | Reports whether an exchange name is known. | [reference](/scripting/v3/reference/catalog/markets#ref-markets-2ehasExchange) |
| `markets.hasSymbol` | callable | markets | Reports whether a symbol is listed on an exchange. | [reference](/scripting/v3/reference/catalog/markets#ref-markets-2ehasSymbol) |
| `markets.stepSize` | callable | markets | Returns the smallest quantity increment for a symbol. | [reference](/scripting/v3/reference/catalog/markets#ref-markets-2estepSize) |
| `markets.symbolBase` | callable | markets | Returns the base asset of a symbol. | [reference](/scripting/v3/reference/catalog/markets#ref-markets-2esymbolBase) |
| `markets.symbolNames` | callable | markets | Lists the symbols available on an exchange. | [reference](/scripting/v3/reference/catalog/markets#ref-markets-2esymbolNames) |
| `markets.symbolQuote` | callable | markets | Returns the quote asset of a symbol. | [reference](/scripting/v3/reference/catalog/markets#ref-markets-2esymbolQuote) |
| `markets.tickSize` | callable | markets | Returns the smallest price increment for a symbol. | [reference](/scripting/v3/reference/catalog/markets#ref-markets-2etickSize) |
| `match` | topic | primer | `match` statement and expression (expression form exhaustive), one arm per line with no commas; a bare-null arm is typed from its siblings. | [reference](/scripting/v3/machine/agent-primer.md#language-model) |
| `math.abs` | callable | math | Returns the absolute value of a number. | [reference](/scripting/v3/reference/catalog/math#ref-math-2eabs) |
| `math.acos` | callable | math | Returns the arccosine of a float in radians. | [reference](/scripting/v3/reference/catalog/math#ref-math-2eacos) |
| `math.asin` | callable | math | Returns the arcsine of a float in radians. | [reference](/scripting/v3/reference/catalog/math#ref-math-2easin) |
| `math.atan` | callable | math | Returns the arctangent of a number in radians. | [reference](/scripting/v3/reference/catalog/math#ref-math-2eatan) |
| `math.atan2` | callable | math | Returns the angle of a vector in radians. | [reference](/scripting/v3/reference/catalog/math#ref-math-2eatan2) |
| `math.cbrt` | callable | math | Returns the cube root of a number. | [reference](/scripting/v3/reference/catalog/math#ref-math-2ecbrt) |
| `math.ceil` | callable | math | Rounds a number up to a whole number. | [reference](/scripting/v3/reference/catalog/math#ref-math-2eceil) |
| `math.ceilTo` | callable | math | Rounds a float up to a multiple of `step`. | [reference](/scripting/v3/reference/catalog/math#ref-math-2eceilTo) |
| `math.clamp` | callable | math | Keeps a number within a range. | [reference](/scripting/v3/reference/catalog/math#ref-math-2eclamp) |
| `math.cos` | callable | math | Returns the cosine of an angle in radians. | [reference](/scripting/v3/reference/catalog/math#ref-math-2ecos) |
| `math.cosh` | callable | math | Returns the hyperbolic cosine of a number. | [reference](/scripting/v3/reference/catalog/math#ref-math-2ecosh) |
| `math.e` | constant | math | Euler's number, the base of natural logarithms. | [reference](/scripting/v3/reference/catalog/math#ref-math-2ee) |
| `math.epsilon` | constant | math | The gap between 1.0 and the next larger float. | [reference](/scripting/v3/reference/catalog/math#ref-math-2eepsilon) |
| `math.exp` | callable | math | Returns e raised to a power. | [reference](/scripting/v3/reference/catalog/math#ref-math-2eexp) |
| `math.floor` | callable | math | Rounds a number down to a whole number. | [reference](/scripting/v3/reference/catalog/math#ref-math-2efloor) |
| `math.floorTo` | callable | math | Rounds a float down to a multiple of `step`. | [reference](/scripting/v3/reference/catalog/math#ref-math-2efloorTo) |
| `math.isEven` | callable | math | Tests whether an integer is even. | [reference](/scripting/v3/reference/catalog/math#ref-math-2eisEven) |
| `math.isFinite` | callable | math | Reports whether a number is finite and non-null. | [reference](/scripting/v3/reference/catalog/math#ref-math-2eisFinite) |
| `math.isOdd` | callable | math | Tests whether an integer is odd. | [reference](/scripting/v3/reference/catalog/math#ref-math-2eisOdd) |
| `math.log` | callable | math | Returns the natural logarithm of a float. | [reference](/scripting/v3/reference/catalog/math#ref-math-2elog) |
| `math.log10` | callable | math | Returns the base-10 logarithm of a float. | [reference](/scripting/v3/reference/catalog/math#ref-math-2elog10) |
| `math.log2` | callable | math | Returns the base-2 logarithm of a float. | [reference](/scripting/v3/reference/catalog/math#ref-math-2elog2) |
| `math.max` | callable | math | Returns the largest of one or more numbers. | [reference](/scripting/v3/reference/catalog/math#ref-math-2emax) |
| `math.maxFloat` | constant | math | The largest finite float. | [reference](/scripting/v3/reference/catalog/math#ref-math-2emaxFloat) |
| `math.maxInt` | constant | math | The largest supported integer. | [reference](/scripting/v3/reference/catalog/math#ref-math-2emaxInt) |
| `math.min` | callable | math | Returns the smallest of one or more numbers. | [reference](/scripting/v3/reference/catalog/math#ref-math-2emin) |
| `math.minFloat` | constant | math | The most negative finite float. | [reference](/scripting/v3/reference/catalog/math#ref-math-2eminFloat) |
| `math.minInt` | constant | math | Lowest supported integer value (-9223372036854775807). | [reference](/scripting/v3/reference/catalog/math#ref-math-2eminInt) |
| `math.pi` | constant | math | Pi, the ratio of a circle's circumference to its diameter. | [reference](/scripting/v3/reference/catalog/math#ref-math-2epi) |
| `math.pow` | callable | math | Raises a number to a power. | [reference](/scripting/v3/reference/catalog/math#ref-math-2epow) |
| `math.randomFloat` | callable | math | Returns a random float from `min` up to, but not including, `max`. | [reference](/scripting/v3/reference/catalog/math#ref-math-2erandomFloat) |
| `math.randomInt` | callable | math | Returns a random whole number between `min` and `max`, including both. | [reference](/scripting/v3/reference/catalog/math#ref-math-2erandomInt) |
| `math.round` | callable | math | Rounds a number to a chosen number of decimal places. | [reference](/scripting/v3/reference/catalog/math#ref-math-2eround) |
| `math.roundTo` | callable | math | Rounds a float to the nearest multiple of `step`. | [reference](/scripting/v3/reference/catalog/math#ref-math-2eroundTo) |
| `math.safeDiv` | callable | math | Returns a division result with a fallback for zero or missing denominators. | [reference](/scripting/v3/reference/catalog/math#ref-math-2esafeDiv) |
| `math.sign` | callable | math | Returns `-1.0`, `0.0`, or `1.0` for a number's sign. | [reference](/scripting/v3/reference/catalog/math#ref-math-2esign) |
| `math.sin` | callable | math | Returns the sine of an angle in radians. | [reference](/scripting/v3/reference/catalog/math#ref-math-2esin) |
| `math.sinh` | callable | math | Returns the hyperbolic sine of a number. | [reference](/scripting/v3/reference/catalog/math#ref-math-2esinh) |
| `math.sqrt` | callable | math | Returns the square root of a float. | [reference](/scripting/v3/reference/catalog/math#ref-math-2esqrt) |
| `math.tan` | callable | math | Returns the tangent of an angle in radians. | [reference](/scripting/v3/reference/catalog/math#ref-math-2etan) |
| `math.tanh` | callable | math | Returns the hyperbolic tangent of a number. | [reference](/scripting/v3/reference/catalog/math#ref-math-2etanh) |
| `math.tau` | constant | math | Tau, equal to `2.0 * math.pi`. | [reference](/scripting/v3/reference/catalog/math#ref-math-2etau) |
| `math.trunc` | callable | math | Removes the fractional part of a number. | [reference](/scripting/v3/reference/catalog/math#ref-math-2etrunc) |
| `mtf` | topic | primer | Multi-timeframe: other subscriptions read their confirmed period inside a handler; `sub.forming.f` is the period in progress; v2 `sub.f(n)` -> `sub.f[n-1]`. | [reference](/scripting/v3/machine/agent-primer.md#subscriptions-and-timeframes) |
| `multi-timeframe` | topic | primer | Inside a handler, other subscriptions read their confirmed period (`daily.high` = yesterday); the period in progress is `daily.forming.high`; v2 `sub.f(n)` maps to `sub.f[n-1]`. | [reference](/scripting/v3/machine/agent-primer.md#subscriptions-and-timeframes) |
| `null` | topic | primer | `T?` nullable types: `x != null` narrows, `??` coalesces, arithmetic with null yields null, conditions need non-null bool, a bare `null` takes its type from context or the sibling ternary/match arm. | [reference](/scripting/v3/machine/agent-primer.md#null-semantics) |
| `open` | event | data | Runs once when a new bar opens. | [reference](/scripting/v3/reference/catalog/data#ref-open) |
| `pane` | callable | surfaces | Adds a separate pane to a chart. | [reference](/scripting/v3/reference/catalog/surfaces#ref-pane) |
| `plot.arrow` | callable | plot | Creates arrows whose direction and height follow a value. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2earrow) |
| `plot.arrow.plot` | callable | plot | Draws an arrow on the current bar. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2earrow-2eplot) |
| `plot.bar` | callable | plot | Creates an OHLC bar plot. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2ebar) |
| `plot.bar.plot` | callable | plot | Draws an OHLC bar on the current bar. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2ebar-2eplot) |
| `plot.bg` | callable | plot | Creates background highlights behind the chart. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2ebg) |
| `plot.bg.plot` | callable | plot | Tints the pane background on the bar being processed. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2ebg-2eplot) |
| `plot.candle` | callable | plot | Creates a candlestick plot. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2ecandle) |
| `plot.candle.plot` | callable | plot | Draws a candle on the current bar. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2ecandle-2eplot) |
| `plot.candle.set` | callable | plot | Adds or updates a candle at a time key. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2ecandle-2eset) |
| `plot.cells` | callable | plot | Creates a plot of per-bar cell rows, such as a footprint or a per-bar profile. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2ecells) |
| `plot.cells.cell` | callable | plot | Adds a cell to a bar. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2ecells-2ecell) |
| `plot.cells.clear` | callable | plot | Removes every cell this plot has on a bar. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2ecells-2eclear) |
| `plot.histogram` | callable | plot | Creates a histogram or bar chart. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2ehistogram) |
| `plot.histogram.plot` | callable | plot | Draws a histogram bar on the current bar. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2ehistogram-2eplot) |
| `plot.histogram.set` | callable | plot | Adds or updates a histogram bar at a key. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2ehistogram-2eset) |
| `plot.label` | callable | plot | Creates a plot of text labels. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2elabel) |
| `plot.label.plot` | callable | plot | Draws a text label on the current bar. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2elabel-2eplot) |
| `plot.line` | callable | plot | Creates a line plot. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2eline) |
| `plot.line.plot` | callable | plot | Draws a line value on the current bar. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2eline-2eplot) |
| `plot.line.set` | callable | plot | Adds or updates a line value at a key. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2eline-2eset) |
| `plot.marker` | callable | plot | Creates a plot of shaped markers. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2emarker) |
| `plot.marker.plot` | callable | plot | Draws a marker on the current bar. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2emarker-2eplot) |
| `plot.point` | callable | plot | Creates a scatter plot of dots. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2epoint) |
| `plot.point.plot` | callable | plot | Draws a dot on the current bar. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2epoint-2eplot) |
| `plot.point.set` | callable | plot | Adds or updates a dot at a key. | [reference](/scripting/v3/reference/catalog/plot#ref-plot-2epoint-2eset) |
| `script.setTitle` | callable | script | Sets the title the chart shows for this script's indicator row. | [reference](/scripting/v3/reference/catalog/script#ref-script-2esetTitle) |
| `setup for` | topic | primer | Setup family: `setup fam = for k in domain { body }`; the domain must be a setup array literal or a list-valued input. | [reference](/scripting/v3/machine/agent-primer.md#collections) |
| `setup-if` | topic | primer | `setup x = if cond expr` — no `else`; false yields `null` (`T?`); composes with `setup for` families. | [reference](/scripting/v3/machine/agent-primer.md#language-model) |
| `shape.asterisk` | constant | plot | Asterisk marker shape. | [reference](/scripting/v3/reference/catalog/plot#ref-shape-2easterisk) |
| `shape.circle` | constant | plot | Circle marker shape. | [reference](/scripting/v3/reference/catalog/plot#ref-shape-2ecircle) |
| `shape.cross` | constant | plot | Cross marker shape. | [reference](/scripting/v3/reference/catalog/plot#ref-shape-2ecross) |
| `shape.diamond` | constant | plot | Diamond marker shape. | [reference](/scripting/v3/reference/catalog/plot#ref-shape-2ediamond) |
| `shape.down` | constant | plot | Down-triangle marker shape. | [reference](/scripting/v3/reference/catalog/plot#ref-shape-2edown) |
| `shape.left` | constant | plot | Left-triangle marker shape. | [reference](/scripting/v3/reference/catalog/plot#ref-shape-2eleft) |
| `shape.plus` | constant | plot | Plus marker shape. | [reference](/scripting/v3/reference/catalog/plot#ref-shape-2eplus) |
| `shape.right` | constant | plot | Right-triangle marker shape. | [reference](/scripting/v3/reference/catalog/plot#ref-shape-2eright) |
| `shape.square` | constant | plot | Square marker shape. | [reference](/scripting/v3/reference/catalog/plot#ref-shape-2esquare) |
| `shape.up` | constant | plot | Up-triangle marker shape. | [reference](/scripting/v3/reference/catalog/plot#ref-shape-2eup) |
| `str.concat` | callable | str | Joins values into one string. | [reference](/scripting/v3/reference/catalog/str#ref-str-2econcat) |
| `str.contains` | callable | str | Tests whether `text` contains `needle`. | [reference](/scripting/v3/reference/catalog/str#ref-str-2econtains) |
| `str.endsWith` | callable | str | Tests whether `text` ends with `suffix`. | [reference](/scripting/v3/reference/catalog/str#ref-str-2eendsWith) |
| `str.format` | callable | str | Inserts values into a text template. | [reference](/scripting/v3/reference/catalog/str#ref-str-2eformat) |
| `str.isEmpty` | callable | str | Reports whether a string is empty. | [reference](/scripting/v3/reference/catalog/str#ref-str-2eisEmpty) |
| `str.len` | callable | str | Counts the Unicode characters in a string. | [reference](/scripting/v3/reference/catalog/str#ref-str-2elen) |
| `str.lower` | callable | str | Converts text to lowercase. | [reference](/scripting/v3/reference/catalog/str#ref-str-2elower) |
| `str.startsWith` | callable | str | Tests whether `text` starts with `prefix`. | [reference](/scripting/v3/reference/catalog/str#ref-str-2estartsWith) |
| `str.trim` | callable | str | Removes whitespace from both ends of text. | [reference](/scripting/v3/reference/catalog/str#ref-str-2etrim) |
| `str.upper` | callable | str | Converts text to uppercase. | [reference](/scripting/v3/reference/catalog/str#ref-str-2eupper) |
| `surfaces.heatmap.set` | callable | surfaces | Adds or updates a heatmap cell. | [reference](/scripting/v3/reference/catalog/surfaces#ref-surfaces-2eheatmap-2eset) |
| `surfaces.pane.setTitle` | callable | surfaces | Sets the title the chart shows for this pane's legend row. | [reference](/scripting/v3/reference/catalog/surfaces#ref-surfaces-2epane-2esetTitle) |
| `surfaces.table.clear` | callable | surfaces | Deletes one row or clears the table. | [reference](/scripting/v3/reference/catalog/surfaces#ref-surfaces-2etable-2eclear) |
| `surfaces.table.row` | callable | surfaces | Adds or replaces a whole table row. | [reference](/scripting/v3/reference/catalog/surfaces#ref-surfaces-2etable-2erow) |
| `surfaces.table.rowBg` | callable | surfaces | Changes the background color of an existing row. | [reference](/scripting/v3/reference/catalog/surfaces#ref-surfaces-2etable-2erowBg) |
| `surfaces.table.set` | callable | surfaces | Changes one cell in an existing row. | [reference](/scripting/v3/reference/catalog/surfaces#ref-surfaces-2etable-2eset) |
| `ta.accDist` | callable | ta | Returns the accumulation/distribution line for the subscription. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2eaccDist) |
| `ta.alma` | callable | ta | Returns the Arnaud Legoux moving average of the last `len` valid samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2ealma) |
| `ta.atr` | callable | ta | Returns the average true range over valid OHLCV samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2eatr) |
| `ta.barsSince` | callable | ta | Returns the number of bars since `condition` was last true. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2ebarsSince) |
| `ta.change` | callable | ta | Returns the change from `source` to a prior valid sample. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2echange) |
| `ta.cross` | callable | ta | Returns true when `left` and `right` cross in either direction. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2ecross) |
| `ta.crossover` | callable | ta | Returns true when `left` crosses above `right`. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2ecrossover) |
| `ta.crossunder` | callable | ta | Returns true when `left` crosses below `right`. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2ecrossunder) |
| `ta.cum` | callable | ta | Returns the cumulative sum of valid `source` samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2ecum) |
| `ta.dev` | callable | ta | Returns the mean absolute deviation of the last `len` non-null samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2edev) |
| `ta.ema` | callable | ta | Returns the exponential moving average. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2eema) |
| `ta.falling` | callable | ta | Reports whether `source` is below every earlier sample in the window. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2efalling) |
| `ta.highest` | callable | ta | Returns the highest value of the last `len` non-null samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2ehighest) |
| `ta.hma` | callable | ta | Returns the Hull moving average of `source`. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2ehma) |
| `ta.linreg` | callable | ta | Returns a linear-regression value over the last `len` valid samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2elinreg) |
| `ta.lowest` | callable | ta | Returns the lowest value of the last `len` non-null samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2elowest) |
| `ta.max` | callable | ta | Returns the running maximum of valid `source` samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2emax) |
| `ta.median` | callable | ta | Returns the median of the last `len` non-null samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2emedian) |
| `ta.mfi` | callable | ta | Returns the money flow index over valid OHLCV samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2emfi) |
| `ta.min` | callable | ta | Returns the running minimum of valid `source` samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2emin) |
| `ta.mode` | callable | ta | Returns the most frequent value of the last `len` non-null samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2emode) |
| `ta.pivotHigh` | callable | ta | Returns a pivot high once later samples confirm it. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2epivotHigh) |
| `ta.pivotLow` | callable | ta | Returns a pivot low once later samples confirm it. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2epivotLow) |
| `ta.rising` | callable | ta | Reports whether `source` is above every earlier sample in the window. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2erising) |
| `ta.rma` | callable | ta | Returns the Wilder's smoothed moving average. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2erma) |
| `ta.roc` | callable | ta | Returns the rate of change from a prior valid sample. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2eroc) |
| `ta.rsi` | callable | ta | Returns the relative strength index over valid source changes. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2ersi) |
| `ta.sma` | callable | ta | Returns the simple moving average of the last `len` non-null samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2esma) |
| `ta.stdev` | callable | ta | Returns the population standard deviation of the last `len` non-null samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2estdev) |
| `ta.stoch` | callable | ta | Returns the stochastic position of `source` within the recent range. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2estoch) |
| `ta.sum` | callable | ta | Returns the sum of the last `len` non-null samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2esum) |
| `ta.swma` | callable | ta | Returns a four-sample symmetrically weighted moving average. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2eswma) |
| `ta.tr` | callable | ta | Returns true range for the subscription's current bar. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2etr) |
| `ta.variance` | callable | ta | Returns the population variance of the last `len` non-null samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2evariance) |
| `ta.vwap` | callable | ta | Returns the volume-weighted average price since the last reset. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2evwap) |
| `ta.vwapDev` | callable | ta | Returns the volume-weighted standard deviation around VWAP. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2evwapDev) |
| `ta.vwma` | callable | ta | Returns a volume-weighted moving average over valid OHLCV samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2evwma) |
| `ta.wma` | callable | ta | Returns the linearly weighted moving average of the last `len` non-null samples. | [reference](/scripting/v3/reference/catalog/ta#ref-ta-2ewma) |
| `table.cell` | callable | surfaces | Adds text color, background color, or alignment to a table value. | [reference](/scripting/v3/reference/catalog/surfaces#ref-table-2ecell) |
| `table.col` | callable | surfaces | Defines a column for a table. | [reference](/scripting/v3/reference/catalog/surfaces#ref-table-2ecol) |
| `table.new` | callable | surfaces | Creates a table panel with fixed columns. | [reference](/scripting/v3/reference/catalog/surfaces#ref-table-2enew) |
| `tf` | callable | time | Converts a string to a timeframe. | [reference](/scripting/v3/reference/catalog/time#ref-tf) |
| `time.bars` | callable | time | Returns the nominal duration of `n` bars on `tf`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2ebars) |
| `time.ceil` | callable | time | Rounds `ts` up to the start of the next `tf` period unless already aligned. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eceil) |
| `time.clock` | callable | time | Formats the UTC clock portion of `ts`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eclock) |
| `time.contains` | callable | time | Reports whether a timestamp is inside the session. | [reference](/scripting/v3/reference/catalog/time#ref-time-2econtains) |
| `time.count` | callable | time | Counts `tf` boundaries from `from` to `to`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2ecount) |
| `time.date` | callable | time | Formats the UTC date portion of `ts`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2edate) |
| `time.dayOfMonth` | callable | time | Returns the UTC day of month of `ts`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2edayOfMonth) |
| `time.dayOfWeek` | callable | time | Returns the UTC ISO day of week of `ts`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2edayOfWeek) |
| `time.dayStart` | callable | time | Returns the UTC day start containing `ts`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2edayStart) |
| `time.days` | callable | time | Constructs a duration of `n` fixed 24-hour days. | [reference](/scripting/v3/reference/catalog/time#ref-time-2edays) |
| `time.diff` | callable | time | Returns the difference between two timestamps. | [reference](/scripting/v3/reference/catalog/time#ref-time-2ediff) |
| `time.durationSeconds` | callable | time | Returns the raw second count of a duration. | [reference](/scripting/v3/reference/catalog/time#ref-time-2edurationSeconds) |
| `time.entered` | callable | time | Tests whether the current timestamp entered the session. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eentered) |
| `time.exited` | callable | time | Tests whether the current timestamp exited the session. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eexited) |
| `time.floor` | callable | time | Rounds `ts` down to the start of its `tf` period. | [reference](/scripting/v3/reference/catalog/time#ref-time-2efloor) |
| `time.format` | callable | time | Formats a timestamp as UTC text. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eformat) |
| `time.fromUnixSeconds` | callable | time | Creates a timestamp from Unix seconds. | [reference](/scripting/v3/reference/catalog/time#ref-time-2efromUnixSeconds) |
| `time.hour` | callable | time | Returns the UTC hour of day of `ts`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2ehour) |
| `time.hours` | callable | time | Creates a duration of `n` hours. | [reference](/scripting/v3/reference/catalog/time#ref-time-2ehours) |
| `time.isAligned` | callable | time | Checks whether `ts` is exactly on a `tf` boundary. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eisAligned) |
| `time.isCalendar` | callable | time | Checks whether a timeframe uses a calendar-length unit. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eisCalendar) |
| `time.isNewPeriod` | callable | time | Checks whether `ts` starts a different `tf` period than `prev`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eisNewPeriod) |
| `time.minute` | callable | time | Returns the UTC minute of hour of `ts`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eminute) |
| `time.minutes` | callable | time | Creates a duration of `n` minutes. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eminutes) |
| `time.month` | callable | time | Returns the UTC month number of `ts`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2emonth) |
| `time.monthStart` | callable | time | Returns the UTC month start containing `ts`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2emonthStart) |
| `time.next` | callable | time | Returns the next `tf` boundary after `ts`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2enext) |
| `time.nominalDuration` | callable | time | Returns the nominal duration of one timeframe period. | [reference](/scripting/v3/reference/catalog/time#ref-time-2enominalDuration) |
| `time.overlaps` | callable | time | Reports whether a time range overlaps the session. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eoverlaps) |
| `time.prev` | callable | time | Returns the previous `tf` boundary before `ts`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eprev) |
| `time.second` | callable | time | Returns the UTC second of minute of `ts`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2esecond) |
| `time.seconds` | callable | time | Creates a duration of `n` seconds. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eseconds) |
| `time.session` | callable | time | Defines a daily time window in UTC. | [reference](/scripting/v3/reference/catalog/time#ref-time-2esession) |
| `time.sessionMinutes` | callable | time | Defines a daily UTC window using minutes after midnight. | [reference](/scripting/v3/reference/catalog/time#ref-time-2esessionMinutes) |
| `time.shiftBars` | callable | time | Moves `ts` by `n` timeframe boundaries. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eshiftBars) |
| `time.tfFromSeconds` | callable | time | Creates a fixed-length timeframe from seconds. | [reference](/scripting/v3/reference/catalog/time#ref-time-2etfFromSeconds) |
| `time.tfSeconds` | callable | time | Returns a timeframe's length in seconds. | [reference](/scripting/v3/reference/catalog/time#ref-time-2etfSeconds) |
| `time.unixSeconds` | callable | time | Converts a timestamp to Unix seconds. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eunixSeconds) |
| `time.weekStart` | callable | time | Returns the start of the UTC week containing `ts`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eweekStart) |
| `time.weeks` | callable | time | Constructs a duration of `n` fixed seven-day weeks. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eweeks) |
| `time.windowEnd` | callable | time | Returns the session window end containing a timestamp. | [reference](/scripting/v3/reference/catalog/time#ref-time-2ewindowEnd) |
| `time.windowStart` | callable | time | Returns the session window start containing a timestamp. | [reference](/scripting/v3/reference/catalog/time#ref-time-2ewindowStart) |
| `time.year` | callable | time | Returns the UTC calendar year of `ts`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eyear) |
| `time.yearStart` | callable | time | Returns the UTC year start containing `ts`. | [reference](/scripting/v3/reference/catalog/time#ref-time-2eyearStart) |
| `trade` | event | data | Runs once for each trade delivered by the subscription. | [reference](/scripting/v3/reference/catalog/data#ref-trade) |
| `update` | event | data | Runs on each update while the current bar is forming. | [reference](/scripting/v3/reference/catalog/data#ref-update) |
| `volbasis.buy` | constant | data | Ranks profile levels by buy volume. | [reference](/scripting/v3/reference/catalog/data#ref-volbasis-2ebuy) |
| `volbasis.deltaAbs` | constant | data | Ranks profile levels by \|buy - sell\| (absolute per-level delta). | [reference](/scripting/v3/reference/catalog/data#ref-volbasis-2edeltaAbs) |
| `volbasis.sell` | constant | data | Ranks profile levels by sell volume. | [reference](/scripting/v3/reference/catalog/data#ref-volbasis-2esell) |
| `volbasis.total` | constant | data | Ranks profile levels by total (buy + sell) volume. | [reference](/scripting/v3/reference/catalog/data#ref-volbasis-2etotal) |
| `window` | callable | surfaces | Creates a window containing charts, heatmaps, or tables. | [reference](/scripting/v3/reference/catalog/surfaces#ref-window) |