Skip to content
Algo Trade Analytics Docs

str.tostring() - Pine Script Function

value (simple int/float) Value or array ID whose elements are converted to a string.

str.tostring(value, format) → simple string
NameTypeDescription
valuesimple int/floatValue or array ID whose elements are converted to a string.

The string representation of the value argument.

  • The formatting of float values will also round those values when necessary, e.g. str.tostring(3.99, ’#’) will return “4”.