Built-ins

Built-in Variables

Built-in variables serve diverse purposes, including:

  • Price- and volume-related variables: open, high, low, close, hl2, hlc3, ohlc4, volume.

Built-in Functions

Built-in functions in Pine Script can be categorized based on their application:

  • Math-related functions in the math namespace: math.abs(), math.log(), math.max().

  • Technical indicators in the ta namespace: ta.sma(), ta.ema(), ta.macd().

  • Support functions used in technical indicator computations in the ta namespace: ta.barssince(), ta.crossover(), ta.highest().

  • Input definition functions under the input namespace: input(), input.color(), input.int().

  • Indicators functions in the indicator namespace for placing orders: indicator.signal().

Last updated