Skip to content
Algo Trade Analytics Docs

xloc - Pine Script Constants

Constants under the xloc namespace.

NameTypeDescription
xloc.bar_indexconst stringA constant that specifies how functions that create and modify Pine drawings interpret x-coordinates. If xloc = xloc.bar_index, the drawing object treats each x-coordinate as a bar_index value.
xloc.bar_timeconst stringA constant that specifies how functions that create and modify Pine drawings interpret x-coordinates. If xloc = xloc.bar_time, the drawing object treats each x-coordinate as a UNIX timestamp, expressed in milliseconds.