Utilities / Reference
type
TradingView-compatible spelling: type, runs without warnings
Declares a structured value with named fields. Construct an instance with Type.new() and define receiver methods with method.
type Level → language constructReturns
language constructExample
type
//@version=6indicator("User-defined type")type Level float price = 0.0Level current = Level.new(close)plot(current.price)Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.