0
votes

I am trying to change the size of a shape if the user checks a box.

ma = sma(hlc3,p)
big = input(false,"Bigger shapes")
plotshape(crossover(hlc3, ma), style=shape.triangleup, color=color.green, size=(big?size.small:size.tiny))

I am confused by the error, not sure what is wrong with size...

Processing script... line 7: Cannot call 'plotshape' with arguments (series[bool], style=const string, color=const color, size=input string); available overloads: plotshape(series[bool], const string, input string, input string, series[color], input integer, series[integer], const string, series[color], const bool, const string, input integer, const integer, string) => void; plotshape(<arg_series_type>, const string, input string, input string, <arg_color_type>, input integer, series[integer], const string, <arg_textcolor_type>, const bool, const string, input integer, const integer, string) => void

1

1 Answers

1
votes

The reference manual for plotshape() states that size must be a constant.
This means that you cannot make the size dependent on a condition.
You'll have to use a fixed size.