Skip to main content
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.

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.

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.

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

Letting the chart user switch overlay. Every argument of indicator is const, and an input is not (see qualifiers). 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.
See Plotting.