CS2104
error The argument param of name must be a constant or an input.
#What it means
This argument must be a constant or an input: something that stays fixed for the whole run. The value you passed can change from bar to bar.
#Typical cause
- A bar value or a calculation on bars passed where a fixed value is needed, for example the price of
hline.
#How to fix it
Pass a constant or an input. For a level that moves with the bars, draw it with plot instead of hline. See Levels.
#Example
//@chartscript 1
indicator("Level")
const level = ta.sma(close, 50)
hline(level)
plot(close)Fixed
//@chartscript 1
indicator("Level")
const level = input.float(100.0, "Level")
hline(level)
plot(close)