Pine Script Variables
Pine Script Variables
Section titled “Pine Script Variables”This page links to variable reference pages. Record-like variables (such as barstate or syminfo) expose fields that are documented on their own pages.
Record Variables
Section titled “Record Variables”| Variable | Focus |
|---|---|
| barstate | Bar state flags. |
| chart | Chart display metadata. |
| dividends | Dividend data fields. |
| earnings | Earnings data fields. |
| session | Session state flags. |
| strategy | Strategy performance metrics. |
| syminfo | Symbol metadata. |
| ta | Built-in TA series variables. |
| table | Table object collections. |
| timeframe | Timeframe metadata. |
| box | Box object collections. |
| label | Label object collections. |
| line | Line object collections. |
| linefill | Line fill object collections. |
| polyline | Polyline object collections. |
Common Series Variables
Section titled “Common Series Variables”| Variable | Purpose |
|---|---|
| open | Open price of the current bar. |
| high | High price of the current bar. |
| low | Low price of the current bar. |
| close | Close price of the current bar. |
| volume | Volume of the current bar. |
| time | Bar open time in UNIX ms. |
| bar_index | Zero-based bar index. |
| dayofweek | Day of week. |
| month | Month of year. |
| year | Year of the bar. |
For functions and other API sections, use the API overview.