Skip to content
Algo Trade Analytics Docs

input.price() - Pine Script Function

Adds a price input to the script’s “Settings/Inputs” tab. The user can change the price in the settings or by selecting the indicator and dragging the price line.

input.price(defval, title, tooltip, inline, group, confirm, display, active) → input float
NameTypeDescription
defvalconst int/floatDetermines the default value of the input variable proposed in the script’s “Settings/Inputs” tab
fromwhere the user can change it.

Value of input variable.

  • The user can change the input’s value by specifying a new value in the “Settings/Inputs” tab, or by moving the input’s marker on the chart. Alternatively, they can select “Reset points” from the script’s “More” menu and set a new input value by clicking a point on the chart.
//@version=6
indicator("input.price", overlay=true)
price1 = input.price(title="Date", defval=42)
plot(price1)price2 = input.price(54, title="Date")
plot(price2)