Metadata / Reference
indicator
TradingView-compatible spelling: indicator, runs without warnings
Defines the script as an indicator and sets its properties.
indicator(title, shorttitle, overlay, format, precision, max_labels_count, max_lines_count, max_boxes_count, max_bars_back, …, scale) → voidParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
title | string | Yes | — | Title of the indicator. |
shorttitle | string | Not specified | — | Short title displayed on the chart (the script pane's header). |
overlay | bool | Not specified | false | If true, will be drawn on main chart pane. |
format | string | Not specified | — | How values are written on the script pane's price scale and in its legend: format.volume (K / M / B), format.percent (a % suffix), format.price / format.inherit (the chart's own). |
precision | int | Not specified | — | Decimals of the values on the script pane's price scale and in its legend (0-16). |
max_labels_count | int | Not specified | — | Max number of labels allowed. |
max_lines_count | int | Not specified | — | Max number of lines allowed. |
max_boxes_count | int | Not specified | — | Max number of boxes allowed. |
max_polylines_count | int | Not specified | — | Max number of polylines allowed (Pine v6). |
max_bars_back | int | Not specified | — | Accepted for compatibility and has no effect: every bar of a series' history can be referenced. |
explicit_plot_zorder | bool | Not specified | — | Accepted for compatibility; it does not change the drawing order. |
timeframe | string | Not specified | — | Accepted for compatibility; the script runs on the chart's timeframe. Use request.security to read another timeframe. |
timeframe_gaps | bool | Not specified | — | Accepted for compatibility; it has no effect because timeframe has none. |
behind_chart | bool | Not specified | — | Accepted for compatibility; it does not change where the script is drawn. |
calc_bars_count | int | Not specified | — | Accepted for compatibility; the script is calculated over every loaded bar. |
dynamic_requests | bool | Not specified | — | Accepted for compatibility: request.* calls inside functions, loops and if blocks, and with a symbol or timeframe that changes from bar to bar, work whether or not it is set. |
scale | string | Not specified | — | Price scale the script is drawn against: scale.right, scale.left or scale.none (an overlay on its own hidden scale, e.g. volume columns under the candles). Named only here: listed last so positional arguments keep their places. |
Returns
voidExample
indicator
indicator("My RSI", overlay=false)plot(rsi(close, 14), { pane: "oscillator" })Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.