Functions
indicator()
This declaration statement defines the script as an indicator and configures various indicator-related properties.
Syntax
indicator(const string title, const string shorttitle, const bool overlay, const string format, const int precision) → void
Arguments
title required const string The title of the script. It is displayed on the chart when no shorttitle argument is used, and becomes the publication's default title when publishing the script. shorttitle const string The script's display name on charts. If specified, it will replace the title argument in most chart-related windows. Optional. The default is the argument used for title overlay const bool If true, the indicator will be displayed over the chart. If false, it will be added in a separate pane. Optional. The default is false. format const string Specifies the formatting of the script's displayed values precision const int Specifies the number of digits after the floating point of the script's displayed values Return Type
void Example
indicator(title="Simple Moving Average", overlay=true,shorttitle="SMA")
sma_value = talib.sma(close, 14)
plot(sma_value, title="SMA 14", color=color.blue, linewidth=2)