Until a few days ago I thought that Pinescript Inputs were not conditional, in fact it is not possible to do something like this.
bool_x = input.bool(true, "On")
if bool_x
integer_x = input.int(0, 'lenght', minval=1)
else
// Do nothing. Don't create this input
That's not possible 'cause inputs use Constant and they cannot be changed.
However i found a script created by a user and i dont know how he did a similar thing, how can i disable an input in the same way he did based on condition?
Here the indicator's name (We cannot see the source code): Session Volume Profile HD