Skip to main content

Builtin

Builtin

Variables

FunctionStatusDescription
bar_indexCurrent bar index
closeClose price
highHigh price
hl2Average of high and low
hlc3Average of high, low, and close
hlcc4Average of high, low, close, and close
last_bar_indexIndex of last bar
last_bar_timeTime of last bar
lowLow price
naNot a number (NaN)
ohlc4Average of open, high, low, and close
openOpen price
timenowCurrent time
volumeVolume
askAsk price
bidBid price
dayofmonthDay of month
dayofweekDay of week
hourHour
minuteMinute
monthMonth
secondSecond
timeBar time
time_closeBar close time
time_tradingdayTrading day time
weekofyearWeek of year
yearYear

Constants

FunctionStatusDescription
falseBoolean false
trueBoolean true

Functions

FunctionStatusDescription
indicator()Indicator declaration
input()Input parameter
na()Check if value is NaN
nz()Replace NaN with zero
alert()Alert function
alertcondition()Alert condition
bool()Boolean conversion
box()Box object
color()Color object
dayofmonth()Day of month function
dayofweek()Day of week function
fill()Fill function
fixnan()Fix NaN values
float()Float conversion
hline()Horizontal line
hour()Hour function
int()Integer conversion
label()Label object
library()Library declaration
line()Line object
linefill()Linefill object
max_bars_back()Maximum bars back
minute()Minute function
month()Month function
second()Second function
strategy()Strategy declaration
string()String conversion
table()Table object
time()Time function
time_close()Time close function
timestamp()Timestamp function
weekofyear()Week of year function
year()Year function
runtime.error()Runtime error