> ## 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.

# format constants

> Reference for the 5 constants of the format namespace: format.inherit, format.mintick, format.percent, format.price and 1 more, each with its definition and an example.

> [!NOTE]
>
> Language version: 2 · Reference version: 2.7 · Date: 2026-10-25 · Compiler build: df7b3b14 · Namespace: format · Entries: 6

## `format` (library)

**Definition**

Named formats for script values: `format.inherit`, `format.price`, `format.percent`, `format.volume` and `format.mintick`. Pass one to the `format` argument of `indicator`, `strategy` or `plot` to control how values appear on the price scale and in the status line.

**Example**

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("format Library Example", overlay=false, format=format.percent)
changePct = (close - close[1]) / close[1] * 100
plot(changePct, title="Change %", color=color.blue)
```

## `format.inherit` (constant)

**Definition**

A format for script values, for the `format` argument of `indicator` and `strategy`. Uses the format of the parent series: the price scale of the chart, or of the pane the script is drawn in. This is the default there. The plot functions (`plot`, `hline`, `plotarrow`, `plotchar`, `plotshape`) refuse it when the script is added to the chart: leave their `format` out.

**Type**

`const string`

**Example**

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("format.inherit Example", overlay=false, format=format.inherit)
plot(talib.rsi(close, 14), title="RSI", color=color.blue)
```

## `format.mintick` (constant)

**Definition**

A format for script values, for the `format` argument of `str.tostring`. Shows values rounded to the instrument's minimum tick. `indicator`, `strategy` and the plot functions pass it in the editor's check but refuse it when the script is added to the chart.

**Type**

`const string`

**Example**

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("format.mintick Example", overlay=true)
if barstate.islast {
    label.new(bar_index, high, str.tostring(close, format.mintick))
}
plot(close)
```

## `format.percent` (constant)

**Definition**

A format for script values, for the `format` argument of `indicator`, `strategy` and the plot functions (`plot`, `hline`, `plotarrow`, `plotchar`, `plotshape`). Shows values as percentages, with a % sign.

**Type**

`const string`

**Example**

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("format.percent Example", overlay=false, format=format.percent)
plot(talib.rsi(close, 14), title="RSI", color=color.blue)
```

## `format.price` (constant)

**Definition**

A format for script values, for the `format` argument of `indicator`, `strategy` and the plot functions (`plot`, `hline`, `plotarrow`, `plotchar`, `plotshape`). Shows values as prices, with as many decimals as the instrument's price scale.

**Type**

`const string`

**Example**

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("format.price Example", overlay=false, format=format.price)
plot(talib.rsi(close, 14), title="RSI", color=color.blue)
```

## `format.volume` (constant)

**Definition**

A format for script values, for the `format` argument of `indicator`, `strategy` and the plot functions (`plot`, `hline`, `plotarrow`, `plotchar`, `plotshape`). Shows values as volume, abbreviating large numbers (for example 5.2K or 1.3M).

**Type**

`const string`

**Example**

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("format.volume Example", overlay=false, format=format.volume)
plot(volume, title="Volume", color=color.blue, style=plotStyle.histogram)
```


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