Skip to content
AlertaChartAlertaScript / docs
AlertaScript / indicator
On this pageSignatureParametersReturnsExample

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) → void

Parameters

NameTypeRequiredDefaultDescription
titlestringYes—Title of the indicator.
shorttitlestringNot specified—Short title displayed on the chart (the script pane's header).
overlayboolNot specifiedfalseIf true, will be drawn on main chart pane.
formatstringNot 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).
precisionintNot specified—Decimals of the values on the script pane's price scale and in its legend (0-16).
max_labels_countintNot specified—Max number of labels allowed.
max_lines_countintNot specified—Max number of lines allowed.
max_boxes_countintNot specified—Max number of boxes allowed.
max_polylines_countintNot specified—Max number of polylines allowed (Pine v6).
max_bars_backintNot specified—Accepted for compatibility and has no effect: every bar of a series' history can be referenced.
explicit_plot_zorderboolNot specified—Accepted for compatibility; it does not change the drawing order.
timeframestringNot specified—Accepted for compatibility; the script runs on the chart's timeframe. Use request.security to read another timeframe.
timeframe_gapsboolNot specified—Accepted for compatibility; it has no effect because timeframe has none.
behind_chartboolNot specified—Accepted for compatibility; it does not change where the script is drawn.
calc_bars_countintNot specified—Accepted for compatibility; the script is calculated over every loaded bar.
dynamic_requestsboolNot 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.
scalestringNot 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

void

Example

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.

AlertaScript

No results found.

Search by name, alias, or keyword.