reggie1968
reggie1968

Reputation: 11

script arguments in my tradingview script

im getting this error back from my script line 47: The arguments 'maxval', 'minval', and 'step' cannot be used with the input() function. You can use the input.int() or input.float() functions to specify a range of input data values.

line 47 rsiOverbought = input.int(60, title = "RSI Overbought", minval = 0, maxval = 50, type = input.integer)

Upvotes: 1

Views: 8891

Answers (1)

Starr Lucky
Starr Lucky

Reputation: 1961

In Pine Script V5 there is no type or minval parameters of input() function. You need to specify type of the input by calling corresponding function -- input.int() for integers, input.float() for float values.

Correct syntax is:

input.int(defval, title, options, tooltip, inline, group, confirm) → input int

or

rsiOverbought = input.int(60, title = "RSI Overbought", minval = 0, maxval = 50)

https://www.tradingview.com/pine-script-reference/v5/#fun_input{dot}int

Upvotes: 3

Related Questions