Pine Script Function Reference
Pine Script Function Reference
Section titled “Pine Script Function Reference”Use this page to jump into the function reference. Each function has its own page, and namespace members are grouped by area.
Start Here
Section titled “Start Here”Strategy.closedtrades Quick Links
Section titled “Strategy.closedtrades Quick Links”- strategy.closedtrades.profit
- strategy.closedtrades.entry_bar_index
- strategy.closedtrades.exit_bar_index
- strategy.closedtrades.entry_id
- strategy.closedtrades.exit_id
- strategy.closedtrades cheat sheet
Namespaces
Section titled “Namespaces”| Namespace | Focus |
|---|---|
| array | Dynamic arrays and utilities. |
| box | Box drawing objects. |
| chart | Chart point helpers. |
| color | Color construction and channels. |
| input | User inputs for scripts. |
| label | Label drawing objects. |
| line | Line drawing objects. |
| linefill | Fills between lines. |
| log | Logging helpers. |
| map | Key/value map utilities. |
| math | Numeric helpers. |
| matrix | Matrix utilities. |
| polyline | Polyline drawing objects. |
| request | Data requests and security calls. |
| runtime | Runtime errors and control. |
| str | String helpers. |
| strategy | Strategy order and reporting helpers. |
| ta | Technical analysis indicators. |
| table | Table drawing objects. |
| ticker | Synthetic tickers and transformations. |
| timeframe | Timeframe conversion helpers. |
Common Core Functions
Section titled “Common Core Functions”| Function | Purpose |
|---|---|
| indicator | Declare an indicator script. |
| strategy | Declare a strategy script. |
| library | Declare a library script. |
| plot | Plot a series line. |
| plotshape | Plot symbols on the chart. |
| plotchar | Plot characters on the chart. |
| hline | Draw horizontal lines. |
| bgcolor | Color the chart background. |
| barcolor | Override bar colors. |
| alertcondition | Define alert conditions. |