> ## Documentation Index
> Fetch the complete documentation index at: https://gocharting.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Price and volume

> The built-in series for a bar's prices, volume and position in the chart, and how to read earlier bars.

The bar being evaluated is available through built-in series; nothing is imported or requested.

| Name | Type | Value |
| - | - | - |
| `open`, `high`, `low`, `close`, `volume` | series float | The bar's prices and volume. |
| `hl2`, `hlc3`, `ohlc4` | series float | (high + low) / 2; (high + low + close) / 3; (open + high + low + close) / 4. |
| `hlcc4` | series float | (high + low + 2 x close) / 4. |
| `bar_index` | series int | Index of the bar, 0 for the first. |
| `last_bar_index` | series int | Index of the last bar, including a forming one. |

These names cannot be redeclared. For `time`, `year` and the rest see [Sessions and intervals](https://gocharting.com/docs/scripting/market-data/sessions-and-intervals.md).

`close[1]` is the previous close and `close[0]` the current one; the index may be a series expression. History reaches back 500 bars, and a larger index stops the script when it runs (see [Limits](https://gocharting.com/docs/scripting/distribution/limits.md)).

`input.source` lets the chart user pick the price. Its default must be one of `open`, `high`, `low`, `close`, `hl2`, `hlc3`, `ohlc4`, `hlcc4`; `volume` is refused: `volume` is not a valid source variable. Expected: open/high/low/close/hl2/hlc3/ohlc4/hlcc4.

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("Average of a chosen price", overlay=true)
src = input.source(close, "Source")
plot(talib.sma(src, 20), title="Average")
```

`chart.is_standard` is true on candles, bars, line and area charts; `chart.is_heikinashi`, `is_renko`, `is_kagi`, `is_linebreak`, `is_pnf`, `is_range` flag the other types.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.