Skip to content
Algo Trade Analytics Docs
Pine library page — review pending. This page is preserved for compatibility but is not part of the reviewed search index. Check the official Pine Script v6 reference before relying on its explanation, signature, or example.

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.