Functions
input.source()
Lets the reader pick which series the script reads — the close, the high, a midpoint, and so on. It is the exception in this namespace: it returns a `series float` rather than an input-form value, so what you get back can differ on every bar.
Syntax
input.source(series float defval, const string title, const string tooltip, const string inline, const string group, const bool confirm) → series float
Arguments
defval required series float The series the control starts on. Required. title const string The label shown beside the control. tooltip const string Help text for the control. inline const string A key that puts several controls on one row. group const string A heading the control sits under. confirm const bool Asks the reader to confirm the value. Return Type
series float Example
indicator("Custom Source Input", overlay=true)
src = input.source(close, title="Data Source")
smaValue = talib.sma(src, 14)
plot(smaValue, title="SMA", color=color.blue, linewidth=2)