I have been trying to print the current volume as a plotshape text label using the following code...
plotshape(EntryCondition, style=shape.labelup, title="Buy flag", location=location.belowbar, color=color.lime, text=str.tostring(volume))
but I keep getting this error..
Cannot call 'plotshape' with argument 'text'='call 'str.tostring' (series string)'. An argument of 'series string' type was used but a 'const string' is expected
Any advice on how to fix this?
There is no way to force the plotshape()
to accept series string, unfortunately.
Use the label.new()
function instead, which allows to plot and change the text dynamically.
if longCondition
label.new(bar_index, low, str.tostring(volume), color = color.lime, style = label.style_label_up)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With