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

# How to plot a value on its own scale rather than over price

> Setting overlay in the indicator declaration, forcing one plot over price with force_overlay, and formatting the scale's numbers.

Pass `overlay=false` in `indicator`. The script then gets its own pane and scale instead of being drawn on the price chart;
`overlay=true` draws it over price. `overlay` defaults to `false`.

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("Bar range", overlay=false)
plot(high - low, title="Range")
```

## One plot over price, the rest in the pane

A chart has a main pane for price and, below it, a pane for each script that is not an overlay. `plot`, `plotshape`, `plotchar`,
`plotarrow`, `plotbar`, `plotcandle`, `bgcolor`, `label.new`, `box.new`, `polyline.new` and `table.new` take `force_overlay=true`
(`line.new` spells it `forceOverlay`), which puts that one output on the price chart whatever the script's `overlay` is. `barcolor`,
`fill`, `hline` and `linefill.new` take none: `fill` follows its plots.

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("Range with price", overlay=false)
plot(high - low, title="Range")
plot(close, title="Close", force_overlay=true)
```

## Format the numbers

`indicator` takes `format` and `precision`. `format` accepts `format.inherit`, `format.price`, `format.volume` and `format.percent`
(`format.mintick` passes the editor's check and fails when the script is added to the chart). `precision` is accepted and has no effect yet: the compiler does not pass it on.

```lipi theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
//@lipi=2
indicator("Volume change", overlay=false, format=format.percent)
plot(talib.roc(volume, 1), title="Change")
```

## Behind the candles

`indicator()` and `strategy()` take `behind_chart` (default `true`): with `true` the script's plots are painted behind the chart's candles. The compiler only passes the flag on; the terminal does the drawing.

## The mistake to avoid

> [!WARNING]
>
> Letting the chart user switch `overlay`. Every argument of `indicator` is `const`, and an input is not (see [qualifiers](https://gocharting.com/docs/scripting/language/qualifiers.md)). The compiler says: Cannot call `indicator` with argument `overlay`=`input.bool(true,"Overlay")`. An argument of `input bool` type was used but a `const bool` is expected.
>
> ```lipi-invalid theme={"languages":{"custom":["/languages/lipi.json","/languages/lipi-invalid.json"]}}
> //@lipi=2
> indicator("Switchable overlay", overlay=input.bool(true, "Overlay"))
> plot(close)
> ```

See [Plotting](https://gocharting.com/docs/scripting/chart-output/plotting.md).


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