Utilities / Reference
alerta.str.tostring
TradingView-compatible spelling: str.tostring, runs without warnings
Converts value to string representation. Supports Pine-style format strings and format enums such as format.mintick. Without a format, a number is written with at most ten decimals and no exponent (0.1 + 0.2 gives "0.3"), na as "NaN", a bool as "true" or "false", and an array as its elements in brackets, such as "[1, 2, 3]".
alerta.str.tostring(value, format) → series stringParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
value | any | Yes | — | Value to format as string. |
format | string | No | — | Optional Pine format pattern, e.g. "#.00", "+#.00;-#.00", or format.mintick. |
Returns
series stringExample
alerta.str.tostring
txt = str.tostring(close, format.mintick)if barstate.islast label.new(bar_index, high, txt)Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.