VARIABLES / DATA

data


bar_index Returns current bar index, where 0 is equal to first loaded historical bar
time Returns unix timestamp (timeseries)
timeframe Returns current timeframe in minutes (e.g. 1min = 1, 1h = 60, 12h = 720, D = 1440, ...)
open Open
high High
low Low
close Close
ohlc4 (Open + High + Low + Close)/4
hlc3 (High + Low + Close)/3
hl2 (High + Low)/2
vbuy Volume buy
vsell Volume sell
oi_open Open Interest Open
oi_high Open Interest High
oi_low Open Interest Low
oi_close Open Interest Close
oi_ohlc4 Open Interest (Open + High + Low + Close)/4
oi_hlc3 Open Interest (High + Low + Close)/3
oi_hl2 Open Interest (High + Low)/2
liq_ask Ask Liquidations
liq_bid Bid Liquidations
funding Funding (Current)
funding_predicted Funding (Predicted)
mark_price Mark Price

dayofweek


dayofweek.sunday Value for Sunday, used with dayofweek(time) function
dayofweek.monday Value for Monday, used with dayofweek(time) function
dayofweek.tuesday Value for Tuesday, used with dayofweek(time) function
dayofweek.wednesday Value for Wednesday, used with dayofweek(time) function
dayofweek.thursday Value for Thursday, used with dayofweek(time) function
dayofweek.friday Value for Friday, used with dayofweek(time) function
dayofweek.saturday Value for Saturday, used with dayofweek(time) function

barstate


barstate.isfirst Returns true if current index is first loaded bar
barstate.islast Returns true if current index is latest bar
barstate.ishistory Returns true if current index is not latest bar
barstate.isnew Returns true if current index is being calculated
barstate.isrealtime Returns true if current index is being updated with new data

color


color.black Color for #000000
color.white Color for #FFFFFF
color.red Color for #FF0000
color.orange Color for #FFA500
color.lime Color for #00FF00
color.blue Color for #0000FF
color.yellow Color for #FFFF00
color.cyan Color for #00FFFF
color.magenta Color for #FF00FF
color.silver Color for #C0C0C0
color.gray Color for #808080
color.maroon Color for #800000
color.olive Color for #808000
color.green Color for #008000
color.purple Color for #800080
color.teal Color for #008080
color.navy Color for #000080

shape


shape.adjust Shape
shape.air Shape
shape.alert Shape
shape.arrow_combo Shape
shape.attach Shape
shape.attention Shape
shape.battery Shape
shape.bell Shape
shape.block Shape
shape.bookmark Shape
shape.bookmarks Shape
shape.bullseye Shape
shape.camera Shape
shape.cancel_circled Shape
shape.cancel_squared Shape
shape.cancel Shape
shape.cd Shape
shape.chart_area Shape
shape.chart_bar Shape
shape.chart_pie Shape
shape.check Shape
shape.circle_empty Shape
shape.circle_thin Shape
shape.circle Shape
shape.clock Shape
shape.cloud_thunder Shape
shape.cloud Shape
shape.cog Shape
shape.database Shape
shape.dot_circled Shape
shape.down_bold Shape
shape.down_circled Shape
shape.down_dir Shape
shape.down_open_big Shape
shape.down_open Shape
shape.down_thin Shape
shape.down Shape
shape.droplet Shape
shape.erase Shape
shape.eye Shape
shape.fast_backward Shape
shape.fast_forward Shape
shape.feather Shape
shape.flag Shape
shape.flash Shape
shape.gauge Shape
shape.heart_empty Shape
shape.heart Shape
shape.help_circled Shape
shape.help Shape
shape.info_circled Shape
shape.info Shape
shape.key Shape
shape.lamp Shape
shape.left_bold Shape
shape.left_circled Shape
shape.left_dir Shape
shape.left_open_big Shape
shape.left_open Shape
shape.left_thin Shape
shape.left Shape
shape.light_down Shape
shape.light_up Shape
shape.link Shape
shape.location Shape
shape.lock_open Shape
shape.lock Shape
shape.magnet Shape
shape.minus_circled Shape
shape.minus_squared Shape
shape.minus Shape
shape.moon Shape
shape.music Shape
shape.note_beamed Shape
shape.note Shape
shape.pause Shape
shape.play Shape
shape.plus_circled Shape
shape.plus_squared Shape
shape.plus Shape
shape.progress_0 Shape
shape.progress_1 Shape
shape.progress_2 Shape
shape.progress_3 Shape
shape.quote Shape
shape.record Shape
shape.right_bold Shape
shape.right_circled Shape
shape.right_dir Shape
shape.right_open_big Shape
shape.right_open Shape
shape.right_thin Shape
shape.right Shape
shape.rocket Shape
shape.rss Shape
shape.search Shape
shape.signal Shape
shape.star_empty Shape
shape.star Shape
shape.stop Shape
shape.tag Shape
shape.target Shape
shape.thermometer Shape
shape.thumbs_down Shape
shape.thumbs_up Shape
shape.to_end Shape
shape.to_start Shape
shape.traffic_cone Shape
shape.trophy Shape
shape.up_bold Shape
shape.up_circled Shape
shape.up_dir Shape
shape.up_open_big Shape
shape.up_open Shape
shape.up_thin Shape
shape.up Shape
shape.water Shape