Types
These are the type names you can use. If you know them from Pine Script, they are the same words: int, float, bool, color, string, line, label, box, table, linefill, polyline, array, matrix, map, series, simple, const, and void.
na means there is no value. nz(na, 3) replaces it. On a sample run, that plotted 3.
true and false are the yes and no values.
int(close), float(close), and bool(close) are names the editor lists. If a conversion does not fit, the message on that line says why.
A value that changes, and one that does not#
series can change on each bar. simple and const are for a value that does not. A length you pass to a moving average in the samples here is a simple number, such as 20 or an input.int.
Lists and your own types#
array, matrix, and map each have their own pages. You can build an array with array.from and walk it with for v in a. A type you define yourself runs. See Differences from Pine Script.
Bullmania is not affiliated with, endorsed or sponsored by TradingView. Pine Script and TradingView are trademarks of TradingView, Inc.