Functions
indicator()
Declares the script and names it. Put it first. Only `title` is required, and every parameter is const-form, so none of them can be built from series data or handed a value that came out of an input.
Syntax
indicator(const string title, const string shorttitle, const bool overlay, const string format, const int precision) → void
Arguments
title required const string The script's name. Required, and const-form, so it must be a constant. shorttitle const string A shorter name for the script. overlay const bool Sets the overlay for the whole script. A single plot has its own overlay switch as well; the two are separate settings. format const string The format the script's values are presented in. precision const int The precision the script's values are presented to. 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)